/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --accent: #00d4ff;
  --accent-secondary: #667eea;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #00d4ff 100%);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a82;
  --border: #2a2a42;
  --gold: #ffd700;
  --green: #00e676;
  --purple: #bb86fc;
  --nav-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.4);
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #eef0f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f2f8;
  --accent: #0077cc;
  --accent-secondary: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #0077cc 100%);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a96;
  --border: #d8dae5;
  --gold: #b8860b;
  --green: #059669;
  --purple: #7c3aed;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .navbar {
  background: rgba(248, 249, 252, 0.88);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 249, 252, 0.96);
}

[data-theme="light"] .nav-menu {
  background: rgba(248, 249, 252, 0.98);
}

[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 119, 204, 0.06) 0%, transparent 60%);
}

[data-theme="light"] .hero-img {
  border-color: var(--bg-primary);
}

[data-theme="light"] .btn-primary {
  color: #ffffff;
}

[data-theme="light"] .btn-primary:hover {
  color: #ffffff;
}

[data-theme="light"] .paper-num {
  color: #ffffff;
}

[data-theme="light"] .particle {
  background: var(--accent-secondary);
  opacity: 0.08;
}

[data-theme="light"] .achievement-badge {
  color: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 26, 0.95);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
  margin-left: 8px;
  flex-shrink: 0;
}

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

.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline; }
[data-theme="light"] .theme-toggle .fa-sun { display: inline; }
[data-theme="light"] .theme-toggle .fa-moon { display: none; }

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(102, 126, 234, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-img-wrapper {
  width: 140px;
  height: 140px;
  margin: 0 auto 28px;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* Typing Cursor */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 0.7s infinite;
}

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

.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 24px;
}

.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
}

.badge-gold {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.08);
}

.badge-blue {
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.08);
}

.badge-purple {
  color: var(--purple);
  border-color: rgba(187, 134, 252, 0.3);
  background: rgba(187, 134, 252, 0.08);
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0a0a1a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25);
  color: #0a0a1a;
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-socials {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-socials a {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

.subsection-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 48px 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.subsection-title i {
  font-size: 1.1rem;
}

/* ========================================
   About Section
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
}

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

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

.stat-number::after {
  content: '+';
}

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

/* ========================================
   Certifications
   ======================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  transition: all var(--transition);
}

.cert-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.1);
}

.cert-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.cert-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cert-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ========================================
   Achievement Banner
   ======================================== */
.achievement-banner {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(102, 126, 234, 0.08) 100%);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 40px;
}

.achievement-badge {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  border-radius: 50%;
  font-size: 2rem;
  color: #1a1a2e;
  box-shadow: 0 0 32px rgba(255, 215, 0, 0.25);
}

.achievement-info h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
}

.achievement-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.achievement-info strong {
  color: var(--text-primary);
}

.cert-card.cert-gold {
  border-color: rgba(255, 215, 0, 0.25);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 215, 0, 0.04) 100%);
}

.cert-card.cert-gold .cert-icon {
  color: var(--gold);
}

.certs-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Recognition Grid */
.recognition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.recognition-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.recognition-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.recognition-card i {
  font-size: 1.8rem;
  color: var(--green);
  margin-bottom: 14px;
}

.recognition-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.recognition-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Contributions
   ======================================== */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.contrib-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
}

.contrib-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contrib-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.contrib-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.contrib-logo-placeholder {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1rem;
}

.contrib-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

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

.contrib-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contrib-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}

.contrib-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.contrib-list a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
}

.contrib-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(0, 230, 118, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

/* ========================================
   Research & Publications
   ======================================== */
.research-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

.research-category {
  margin-bottom: 40px;
}

.category-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.category-title i {
  color: var(--accent);
}

.papers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paper-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
}

.paper-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.paper-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: #0a0a1a;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.paper-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
}

.paper-links {
  display: flex;
  gap: 12px;
}

.paper-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

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

/* ========================================
   Projects
   ======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 1.8rem;
  color: var(--accent);
}

.project-links-top a {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.project-links-top a:hover {
  color: var(--accent);
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent);
  font-weight: 500;
}

.project-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 165, 0, 0.12);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.25);
  vertical-align: middle;
  margin-left: 8px;
}

.project-ref {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

/* ========================================
   Skills
   ======================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}

.skill-category:hover {
  border-color: var(--accent);
}

.skill-category h3 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.skill-category h3 i {
  color: var(--accent);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(102, 126, 234, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(102, 126, 234, 0.15);
  font-weight: 500;
}

/* ========================================
   Writing
   ======================================== */
.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.writing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  display: block;
}

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

.writing-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.writing-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.writing-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.writing-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Featured writing (CNCF blogs etc.) */
.writing-featured {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.writing-feature-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all var(--transition);
  color: var(--text-primary);
}

.writing-feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text-primary);
}

.writing-feature-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
  margin-bottom: 12px;
}

.writing-date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.writing-feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.writing-feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Conferences & Talks
   ======================================== */
.talks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.talk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.talk-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.talk-conference {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.talk-event {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
}

.talk-track {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.talk-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.talk-speaker {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.talk-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.talk-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.talk-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.talk-meta i {
  color: var(--accent);
  font-size: 0.75rem;
}

.talk-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.talk-links a {
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(102, 126, 234, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(102, 126, 234, 0.15);
  transition: all var(--transition);
}

.talk-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ========================================
   Contact
   ======================================== */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-card i {
  font-size: 1.2rem;
  color: var(--accent);
}

/* ========================================
   GitHub Activity Heatmap
   ======================================== */
.github-activity {
  margin-top: 48px;
}

.github-activity-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.github-heatmap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  text-align: center;
}

.github-heatmap img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.github-streak {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.github-streak img {
  width: 100%;
  border-radius: var(--radius-sm);
}

/* ========================================
   Contribution Timeline
   ======================================== */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 72px;
  padding-bottom: 40px;
}

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

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

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.4);
}

[data-theme="light"] .timeline-item:hover .timeline-dot {
  box-shadow: 0 0 16px rgba(0, 119, 204, 0.3);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
}

.timeline-item:hover .timeline-content {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.timeline-tags span {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent);
  font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-gradient);
  z-index: 1100;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

[data-theme="light"] .scroll-progress {
  box-shadow: 0 0 8px rgba(0, 119, 204, 0.3);
}

/* ========================================
   Animated Hero Border
   ======================================== */
.hero-img-wrapper {
  position: relative;
  background: none;
  padding: 4px;
}

.hero-img-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(
    from var(--hero-rotate, 0deg),
    #667eea, #00d4ff, #ffd700, #00e676, #bb86fc, #667eea
  );
  animation: hero-spin 4s linear infinite;
  z-index: -1;
  filter: blur(3px);
}

.hero-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from var(--hero-rotate, 0deg),
    #667eea, #00d4ff, #ffd700, #00e676, #bb86fc, #667eea
  );
  animation: hero-spin 4s linear infinite;
  z-index: -1;
}

@property --hero-rotate {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes hero-spin {
  to { --hero-rotate: 360deg; }
}

/* Fallback for browsers without @property */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .hero-img-wrapper::before,
  .hero-img-wrapper::after {
    background: var(--accent-gradient);
    animation: none;
  }
}

/* ========================================
   Card Glow Effects
   ======================================== */
.project-card:hover,
.contrib-card:hover,
.writing-feature-card:hover,
.talk-card:hover {
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.12), 0 0 0 1px rgba(0, 212, 255, 0.15);
}

[data-theme="light"] .project-card:hover,
[data-theme="light"] .contrib-card:hover,
[data-theme="light"] .writing-feature-card:hover,
[data-theme="light"] .talk-card:hover {
  box-shadow: 0 8px 32px rgba(0, 119, 204, 0.1), 0 0 0 1px rgba(0, 119, 204, 0.12);
}

.stat-card:hover {
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
}

.cert-card:hover {
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.12);
}

/* ========================================
   Staggered Fade-in
   ======================================== */
.fade-in-stagger > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger > *:nth-child(2) { transition-delay: 0.08s; }
.fade-in-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.fade-in-stagger > *:nth-child(4) { transition-delay: 0.24s; }
.fade-in-stagger > *:nth-child(5) { transition-delay: 0.32s; }
.fade-in-stagger > *:nth-child(6) { transition-delay: 0.40s; }
.fade-in-stagger > *:nth-child(7) { transition-delay: 0.48s; }
.fade-in-stagger > *:nth-child(8) { transition-delay: 0.56s; }

.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   3D Tilt
   ======================================== */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card:hover {
  transition: none;
}

/* ========================================
   Back-to-Top Button
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #0a0a1a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
  transform: translateY(-3px);
}

[data-theme="light"] .back-to-top {
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 119, 204, 0.2);
}

[data-theme="light"] .back-to-top:hover {
  box-shadow: 0 8px 32px rgba(0, 119, 204, 0.3);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Particles */
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.15;
  pointer-events: none;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .certs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .certs-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .recognition-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .writing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .writing-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .conferences-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: flex;
  }

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

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

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .certs-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .achievement-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

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

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

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

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

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

  .writing-grid-3 {
    grid-template-columns: 1fr;
  }

  .writing-featured {
    grid-template-columns: 1fr;
  }

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

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

  .github-streak {
    grid-template-columns: 1fr;
  }

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

  .timeline-dot {
    left: 6px;
    width: 22px;
    height: 22px;
  }

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

  .section {
    padding: 64px 0;
  }

  .hero-badges {
    flex-direction: column;
    align-items: center;
  }
}

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

  .certs-grid-5 {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

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