/* =============================================
   ROOT VARIABLES
   ============================================= */
:root {
  --bg-dark:     #080c14;
  --bg-dark2:    #0d1321;
  --bg-card:     #111827;
  --bg-card2:    #161f2e;
  --primary:     #4f8ef7;
  --primary-glow:#4f8ef740;
  --accent:      #00f5c4;
  --accent-glow: #00f5c430;
  --gold:        #f5c518;
  --white:       #ffffff;
  --text:        #c8d4e8;
  --text-muted:  #6b7a99;
  --border:      #1e2d44;
  --radius:      16px;
  --radius-sm:   10px;
  --transition:  0.3s cubic-bezier(.4,0,.2,1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
strong { color: var(--white); }

/* Touch interaction optimizations — remove 300ms tap delay & default highlight */
a, button, .btn, .cert-card, .hamburger, .back-to-top,
.contact-item, .nav-link, .msg-option, .cert-sub-item,
.skill-card, .project-card, .achieve-card, .extra-card,
.highlight-item, .timeline-card, .cert-lightbox-close,
.cert-back-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */
.cursor-dot {
  position: fixed; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, background 0.2s;
  opacity: 0;
}
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1.5px solid var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.2s;
  opacity: 0;
}
.ring-hover { width: 56px; height: 56px; border-color: var(--primary); }
.dot-hover { transform: translate(-50%, -50%) scale(2); background: var(--primary); }

/* =============================================
   PARTICLES CANVAS
   ============================================= */
#particles-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* =============================================
   LOADER
   ============================================= */
.loader {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-circuit {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-right-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-text {
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem; color: var(--text-muted);
  letter-spacing: 0.1em;
}
.loader-dots { animation: blink 1s step-end infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(20px);
  padding: 14px 48px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--white); letter-spacing: 0.02em;
}
.logo-bracket { color: var(--accent); }
.nav-links {
  list-style: none; display: flex; gap: 36px;
}
.nav-link {
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition); position: relative;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 120px 8vw 80px;
  overflow: hidden; z-index: 1;
}

.hero-grid-lines {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(79,142,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0;
}
.glow-1 { width: 600px; height: 600px; background: rgba(79,142,247,0.12); top: -200px; left: -100px; }
.glow-2 { width: 500px; height: 500px; background: rgba(0,245,196,0.08); bottom: -100px; right: 200px; }
.glow-3 { width: 300px; height: 300px; background: rgba(79,142,247,0.06); top: 50%; left: 40%; }

.hero-content {
  position: relative; z-index: 2;
  max-width: 620px;
}

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 24px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,245,196,0.08);
  border: 1px solid rgba(0,245,196,0.2);
  padding: 6px 16px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 500;
  color: var(--accent); margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,245,196,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(0,245,196,0); }
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700; line-height: 1.05;
  color: var(--white); margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.name-highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-typewriter {
  font-family: 'Fira Code', monospace;
  font-size: 1.15rem; color: var(--text-muted);
  margin-bottom: 24px;
}
.typewriter { color: var(--primary); }
.cursor-blink { color: var(--accent); animation: blink 0.8s step-end infinite; }

.hero-desc {
  font-size: 1.05rem; color: var(--text-muted);
  line-height: 1.8; margin-bottom: 36px;
}
.highlight-text {
  color: var(--white); font-weight: 600;
  background: linear-gradient(135deg, rgba(79,142,247,0.15), rgba(0,245,196,0.1));
  padding: 1px 8px; border-radius: 4px;
  border: 1px solid rgba(79,142,247,0.2);
  white-space: nowrap;
  display: inline;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 48px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  transition: var(--transition); cursor: none;
  border: none; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0f1a;
  box-shadow: 0 0 30px rgba(79,142,247,0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(79,142,247,0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  background: rgba(0,245,196,0.05);
}

.hero-stats {
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem; font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* PCB Visual Card */
.hero-visual {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
/* ---- Profile Card ---- */
.profile-card {
  position: relative; width: 300px;
  background: var(--bg-card);
  border: 1px solid rgba(0,245,196,0.2);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,245,196,0.05), 0 40px 80px rgba(0,0,0,0.6), 0 0 60px rgba(0,245,196,0.08);
  animation: float 6s ease-in-out infinite;
}
/* Corner accents */
.pc-corner {
  position: absolute; width: 16px; height: 16px;
  border-color: var(--accent); border-style: solid; z-index: 10;
}
.pc-tl { top: 12px; left: 12px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.pc-tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.pc-bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.pc-br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }
/* Photo area */
.pc-photo-wrap {
  position: relative; width: 100%; height: 300px; overflow: hidden;
}
.pc-photo {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}
.pc-photo-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-card));
}
/* Info section */
.pc-info {
  padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px;
}
.pc-status {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,245,196,0.08); border: 1px solid rgba(0,245,196,0.2);
  border-radius: 20px; padding: 4px 12px; width: fit-content;
  font-size: 0.7rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.pc-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite; flex-shrink: 0;
}
.pc-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 700; color: var(--white); line-height: 1.2;
}
.pc-title {
  font-size: 0.75rem; color: var(--accent); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.pc-divider {
  height: 1px; background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.25;
}
.pc-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  transition: var(--transition);
}
.pc-chip:hover { color: var(--accent); border-color: rgba(0,245,196,0.3); }
.pc-chip i { color: var(--accent); font-size: 0.65rem; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.floating-chips {
  position: absolute; inset: 0; pointer-events: none;
}
.chip {
  position: absolute;
  background: rgba(13,19,33,0.95);
  border: 1px solid var(--border);
  color: var(--text); font-size: 0.72rem; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
  display: flex; align-items: center; gap: 6px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.chip i { color: var(--accent); }
.chip-1 { top: 16px; left: -30px; animation: floatChip 4s ease-in-out infinite; }
.chip-2 { top: 16px; right: -20px; animation: floatChip 4s ease-in-out infinite 1s; }
.chip-3 { bottom: 80px; left: -40px; animation: floatChip 4s ease-in-out infinite 2s; }
.chip-4 { bottom: 50px; right: -20px; animation: floatChip 4s ease-in-out infinite 0.5s; }
@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 0.72rem;
  animation: fadeInUp 1s 2s both;
  z-index: 2;
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
  width: 4px; height: 8px;
  background: var(--accent); border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
.reveal-up {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal-left {
  opacity: 0; transform: translateX(-50px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal-right {
  opacity: 0; transform: translateX(50px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.revealed { opacity: 1 !important; transform: none !important; }

/* =============================================
   SECTIONS
   ============================================= */
.section {
  position: relative; z-index: 1;
  padding: 100px 0;
}
.section-dark { background: var(--bg-dark2); }
.section-container {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase;
  display: block; margin-bottom: 12px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; color: var(--white);
  line-height: 1.1; margin-bottom: 16px;
}
.title-underline {
  width: 60px; height: 3px; margin: 0 auto;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 2px;
}
.section-subtitle {
  font-size: 1rem; color: var(--text-muted);
  max-width: 500px; margin: 16px auto 0;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 48px; align-items: stretch;
}
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px; text-align: center;
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%;
}
.about-avatar-wrap {
  position: relative; display: inline-block; margin-bottom: 24px;
}
.about-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 3px solid var(--accent);
  box-shadow: 0 0 24px rgba(0,245,196,0.3);
  margin: 0 auto;
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.avatar-icon {
  font-size: 2.4rem; color: #0a0f1e; opacity: 0.85;
}
.avatar-ring {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%; border: 1px solid;
  transform: translate(-50%, -50%);
  animation: expandRing 3s ease-out infinite;
}
.ring-1 { width: 110px; height: 110px; border-color: rgba(0,245,196,0.3); animation-delay: 0s; }
.ring-2 { width: 140px; height: 140px; border-color: rgba(79,142,247,0.2); animation-delay: 0.6s; }
.ring-3 { width: 170px; height: 170px; border-color: rgba(0,245,196,0.1); animation-delay: 1.2s; }
@keyframes expandRing {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}
.edu-block {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; text-align: left;
  transition: var(--transition);
}
.edu-block:hover { border-color: rgba(252,255,0,0.3); background: rgba(252,255,0,0.03); }
.edu-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: #fcff00;
  border: 2px solid rgba(252, 255, 0, 0.55);
  box-shadow: 0 0 8px rgba(252, 255, 0, 0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.edu-college-logo {
  width: 100%; height: 100%; object-fit: contain;
}
.edu-degree { font-size: 0.88rem; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.edu-school { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.edu-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.edu-year { font-size: 0.75rem; color: var(--text-muted); }
.edu-cgpa {
  font-size: 0.75rem; font-weight: 700;
  background: linear-gradient(135deg, #fff3cd, #ffe082);
  color: #7c5c00; padding: 2px 8px; border-radius: 20px;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.about-intro {
  font-size: 1.05rem; line-height: 1.85; color: var(--text);
  margin-bottom: 24px; text-align: justify;
}
.about-highlights {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 0;
}
.highlight-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  transition: var(--transition);
}
.highlight-item:hover { border-color: var(--accent); background: rgba(0,245,196,0.03); }
.highlight-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(0,245,196,0.1); border: 1px solid rgba(0,245,196,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 0.9rem; flex-shrink: 0;
}
.highlight-item small { font-size: 0.78rem; color: var(--text-muted); }

.research-spotlight {
  margin-top: 36px;
  background: linear-gradient(135deg, rgba(79,142,247,0.08), rgba(0,245,196,0.05));
  border: 1px solid rgba(79,142,247,0.25);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: 24px 30px;
}
.research-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--primary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.research-spotlight p {
  font-size: 0.9rem; color: var(--white); font-weight: 600;
  line-height: 1.5; margin-bottom: 8px;
}
.research-authors {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.4;
  margin-bottom: 12px;
}
.research-authors strong { color: var(--accent); }
.research-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.journal-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  background: rgba(79,142,247,0.15); color: var(--primary);
  border: 1px solid rgba(79,142,247,0.3);
  padding: 3px 10px; border-radius: 20px;
}
.pub-doi-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  background: rgba(0,245,196,0.1); border: 1px solid rgba(0,245,196,0.25);
  padding: 4px 12px; border-radius: 20px;
  transition: var(--transition);
}
.pub-doi-btn:hover {
  background: rgba(0,245,196,0.2); color: var(--white);
  transform: translateX(2px);
}

.about-current-role {
  margin-top: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  transition: var(--transition);
  text-align: left;
}
.about-current-role:hover { border-color: rgba(61,205,88,0.35); background: rgba(61,205,88,0.04); }
.about-current-body { display: flex; align-items: center; gap: 14px; }
.about-se-logo-box {
  width: 52px; height: 52px; flex-shrink: 0;
  background: #ffffff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.about-se-logo {
  width: 100%; height: 100%; object-fit: contain;
}
.about-current-info {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; min-width: 0;
}
.about-current-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; width: 100%;
}
.about-current-company {
  font-size: 0.9rem; font-weight: 700; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.about-current-dot-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: #a0aec0; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 20px; padding: 2px 8px;
  white-space: nowrap; flex-shrink: 0;
}
.about-current-dot-pill i { color: #00f5c4; font-size: 0.6rem; }
.about-current-role-name { font-size: 0.78rem; color: var(--accent); font-weight: 600; line-height: 1.3; }
.about-current-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--text-muted);
}
.about-current-meta span { display: inline-flex; align-items: center; }
.about-current-meta i { margin-right: 4px; }

/* =============================================
   SKILLS
   ============================================= */
.skills-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; margin-bottom: 48px;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.skill-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  opacity: 0; transition: opacity var(--transition);
}
.skill-card:hover { border-color: rgba(0,245,196,0.3); transform: translateY(-4px); }
.skill-card:hover::before { opacity: 1; }
.skill-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(79,142,247,0.15), rgba(0,245,196,0.1));
  border: 1px solid rgba(79,142,247,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.2rem;
  margin-bottom: 16px;
}
.skill-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem; font-weight: 600; color: var(--white);
  margin-bottom: 20px;
}
.skill-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.skill-bar-item {}
.skill-bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; margin-bottom: 5px; color: var(--text);
}
.skill-pct {
  font-size: 0.68rem; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap; letter-spacing: 0.04em;
}
.level-expert       { background: rgba(0,245,196,0.12); color: #00f5c4; border: 1px solid rgba(0,245,196,0.3); }
.level-advanced     { background: rgba(79,142,247,0.12); color: #4f8ef7; border: 1px solid rgba(79,142,247,0.3); }
.level-proficient   { background: rgba(168,85,247,0.12); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.level-intermediate { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.level-beginner     { background: rgba(107,114,153,0.12); color: #6b7a99; border: 1px solid rgba(107,114,153,0.3); }
.skill-bar-track {
  height: 5px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px rgba(0,245,196,0.4);
}
.skill-tags-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tags-mini span {
  font-size: 0.7rem; padding: 3px 9px; border-radius: 20px;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.2);
  color: var(--primary); font-weight: 500;
}

/* Certifications card grid */
.certs-section { margin-top: 12px; }
.certs-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.certs-heading {
  font-size: 0.88rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 8px;
}
.certs-heading i { color: var(--gold); }
.certs-count {
  font-size: 0.75rem; color: var(--text-muted);
  background: rgba(0,245,196,0.08); border: 1px solid rgba(0,245,196,0.2);
  padding: 3px 12px; border-radius: 20px;
}
.certs-count span { color: var(--accent); font-weight: 700; margin-right: 4px; }

.cert-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-bottom: 40px;
}
.cert-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.cert-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cert-color);
  border-radius: 3px 0 0 3px;
}
.cert-card:hover {
  border-color: var(--cert-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cert-card-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: color-mix(in srgb, var(--cert-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cert-color) 30%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--cert-color); font-size: 0.9rem;
}
.cert-card-body { flex: 1; min-width: 0; }
.cert-card-title {
  font-size: 0.82rem; font-weight: 600; color: var(--white);
  line-height: 1.3; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cert-card-org {
  font-size: 0.7rem; color: var(--text-muted); font-weight: 500;
}
.cert-verified {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: rgba(0,245,196,0.12); border: 1px solid rgba(0,245,196,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 0.55rem;
}

/* =============================================
   TIMELINE (EXPERIENCE)
   ============================================= */
.timeline { position: relative; max-width: 1120px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute;
  left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--border) 10%, var(--border) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex; gap: 32px;
  margin-bottom: 56px; position: relative;
}
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-dot {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #0a0f1a; font-size: 1rem;
  position: relative; z-index: 2;
  align-self: flex-start;
  box-shadow: 0 0 20px rgba(0,245,196,0.3);
  margin-top: 8px;
}
.timeline-item:nth-child(odd) { padding-right: calc(50% + 48px); }
.timeline-item:nth-child(even) { padding-left: calc(50% + 48px); }
.timeline-item:nth-child(odd) .timeline-dot { position: absolute; right: calc(50% - 24px); }
.timeline-item:nth-child(even) .timeline-dot { position: absolute; left: calc(50% - 24px); }

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px; flex: 1;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.timeline-card:hover {
  border-color: rgba(0,245,196,0.35);
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(0,0,0,0.38);
}

.timeline-company {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 4px;
}
.timeline-role {
  font-size: 0.94rem; color: var(--accent); margin-bottom: 10px; font-weight: 600;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.timeline-badge-current {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #0a0f1a; padding: 2px 9px; border-radius: 20px;
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,245,196,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(0,245,196,0); }
}
.timeline-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text-muted);
  margin-bottom: 14px;
}
.timeline-meta i { margin-right: 4px; }
.timeline-desc {
  font-size: 0.91rem; line-height: 1.75; color: var(--text);
  margin-bottom: 16px; text-align: left;
}
.timeline-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.timeline-bullets li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  position: relative;
  padding-left: 18px;
}
.timeline-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--accent);
  font-size: 1.15rem;
}
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-tags span {
  font-size: 0.72rem; padding: 4px 10px; border-radius: 20px;
  background: rgba(0,245,196,0.08); border: 1px solid rgba(0,245,196,0.15);
  color: var(--accent); font-weight: 500;
}

/* ---- Timeline Logos ---- */
.timeline-logo {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.timeline-item:nth-child(odd) .timeline-logo  { right: 0; width: calc(50% - 56px); }
.timeline-item:nth-child(even) .timeline-logo { left: 0;  width: calc(50% - 56px); }
.timeline-logo-box {
  width: 150px; height: 120px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  transition: var(--transition);
  pointer-events: all;
}
.timeline-logo-box:hover { border-color: rgba(0,245,196,0.35); transform: scale(1.06); }
.timeline-logo-box.logo-se {
  background: rgba(255,255,255,0.95);
  width: 200px; height: 95px;
  border-radius: 14px;
}
.timeline-logo-box.logo-se img { width: 100%; height: 100%; object-fit: contain; }
.timeline-logo-box.logo-ml {
  background: rgba(255,255,255,0.95);
  width: 190px; height: 110px;
  border-radius: 14px;
}
.timeline-logo-box.logo-ml img { width: 100%; height: 100%; object-fit: contain; }
/* SVG / PNG with transparent bg — show on white card */
.timeline-logo-box.logo-light {
  background: rgba(255,255,255,0.95);
  border-color: rgba(200,200,200,0.25) !important;
}
.timeline-logo-box.logo-light img { width: 82%; height: 82%; object-fit: contain; }
.timeline-logo-box.logo-renom {
  background: rgba(255,255,255,0.95);
  width: 200px; height: 95px;
  border-radius: 14px;
}
.timeline-logo-box.logo-renom img { width: 100%; height: 100%; object-fit: contain; }
/* JFIF — has own background, show full logo */
.timeline-logo-box.logo-photo img { width: 100%; height: 100%; object-fit: contain; }
/* Default img sizing */
.timeline-logo-box img { width: 88%; height: 88%; object-fit: contain; }
.timeline-logo-icon {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px;
}
.timeline-logo-icon i { font-size: 2rem; }
.timeline-logo-icon span {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em;
  text-align: center; line-height: 1.3; padding: 0 8px;
  color: var(--text-muted);
}

/* =============================================
   FILTER TABS (PROJECTS & SKILLS)
   ============================================= */
.filter-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  justify-content: center;
}
.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0f1a;
  box-shadow: 0 4px 18px rgba(0,245,196,0.35);
}
.filter-btn .filter-count {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: inherit;
}
.filter-btn.active .filter-count {
  background: rgba(10,15,26,0.25);
  color: #0a0f1a;
  font-weight: 700;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px; position: relative; overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card-wide {
  grid-column: 1 / -1;
}
.project-card:hover {
  border-color: rgba(79,142,247,0.4);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.project-card-glow {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(79,142,247,0.08), transparent 70%);
  opacity: 0; transition: opacity var(--transition);
  pointer-events: none;
}
.project-card:hover .project-card-glow { opacity: 1; }

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.project-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.project-domain-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
}
.tag-robotics {
  background: rgba(0,245,196,0.12);
  border: 1px solid rgba(0,245,196,0.3);
  color: #00f5c4;
}
.tag-software {
  background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.3);
  color: #4f8ef7;
}
.tag-embedded {
  background: rgba(192,132,252,0.12);
  border: 1px solid rgba(192,132,252,0.3);
  color: #c084fc;
}
.tag-hardware {
  background: rgba(251,146,60,0.12);
  border: 1px solid rgba(251,146,60,0.3);
  color: #fb923c;
}

.project-highlight-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.3);
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-num {
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.8;
  font-weight: 600;
  white-space: nowrap;
}
.project-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(79,142,247,0.15), rgba(0,245,196,0.1));
  border: 1px solid rgba(79,142,247,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--primary);
  margin-bottom: 16px;
}
.project-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}
.project-domain-tag svg {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: -2px;
}
.project-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem; font-weight: 700; color: var(--white);
  margin-bottom: 12px; line-height: 1.35;
}
.project-desc {
  font-size: 0.88rem; color: var(--text); line-height: 1.7;
  margin-bottom: 18px; text-align: justify; flex: 1;
}
.project-stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
}
.project-stack span {
  font-size: 0.7rem; padding: 3px 9px; border-radius: 20px;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.2);
  color: var(--primary); font-weight: 500;
}

.featured-project { border-color: rgba(245, 197, 24, 0.25); }
.featured-project:hover { border-color: rgba(245, 197, 24, 0.5); }

/* Timeline systems bullet list */
.timeline-systems-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 16px;
}
.timeline-systems-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}
.timeline-systems-list li i {
  color: var(--accent);
  font-size: 0.5rem;
  margin-top: 6px;
  flex-shrink: 0;
}
.timeline-systems-list li strong {
  color: var(--white);
}

/* Filter Hide & Animation */
.is-hidden {
  display: none !important;
}
@keyframes filterReveal {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.filter-animate {
  animation: filterReveal 0.4s cubic-bezier(.4,0,.2,1) forwards;
}

/* =============================================
   ACHIEVEMENTS
   ============================================= */
.achieve-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 36px;
}
.achieve-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center;
  transition: var(--transition);
}
.achieve-card:hover { transform: translateY(-5px); }
.gold-card { border-color: rgba(245, 197, 24, 0.2); }
.gold-card:hover { border-color: rgba(245, 197, 24, 0.5); box-shadow: 0 0 40px rgba(245, 197, 24, 0.1); }
.silver-card:hover { border-color: rgba(0,245,196,0.3); box-shadow: 0 0 40px rgba(0,245,196,0.06); }
.achieve-trophy { font-size: 3rem; margin-bottom: 12px; }
.achieve-rank {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.15em; margin-bottom: 10px; padding: 4px 12px; border-radius: 20px; display: inline-block;
}
.gold-rank { background: rgba(245, 197, 24, 0.12); color: var(--gold); border: 1px solid rgba(245, 197, 24, 0.25); }
.silver-rank { background: rgba(0,245,196,0.08); color: var(--accent); border: 1px solid rgba(0,245,196,0.2); }
.achieve-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.achieve-card p { font-size: 0.83rem; color: var(--text-muted); }

.extra-cards { display: flex; flex-direction: column; gap: 14px; }
.extra-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px;
  transition: var(--transition);
}
.extra-card:hover { border-color: rgba(79,142,247,0.3); }
.extra-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1rem;
}
.extra-text strong { display: block; font-size: 0.9rem; color: var(--white); margin-bottom: 3px; }
.extra-text p { font-size: 0.83rem; color: var(--text-muted); }

/* =============================================
   CONTACT
   ============================================= */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch;
}
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-cta { display: flex; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px;
  transition: var(--transition); color: var(--text);
}
.contact-item:hover { border-color: var(--accent); transform: translateX(6px); }
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,245,196,0.12), rgba(79,142,247,0.08));
  border: 1px solid rgba(0,245,196,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.1rem;
}
.contact-detail { display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.contact-value { font-size: 0.9rem; font-weight: 500; color: var(--white); }

.cta-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; text-align: center;
  position: relative; overflow: hidden;
  width: 100%;
  display: flex; flex-direction: column; justify-content: center;
}
.cta-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0,245,196,0.06), transparent 70%);
}
.cta-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #0a0f1a;
  box-shadow: 0 0 30px rgba(0,245,196,0.3);
  position: relative;
}
.cta-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--white);
  margin-bottom: 10px; position: relative;
}
.cta-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 28px; position: relative; }

/* =============================================
   MESSAGE POPUP
   ============================================= */
.msg-popup-wrap { position: relative; display: inline-block; }
.msg-trigger { position: relative; z-index: 2; }
.msg-chevron { transition: transform 0.3s ease; }
.msg-popup-wrap.open .msg-chevron { transform: rotate(180deg); }
.msg-options {
  position: absolute; bottom: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px; min-width: 210px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,245,196,0.08);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.msg-popup-wrap.open .msg-options {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.msg-option {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.msg-option:hover { color: var(--white); }
.msg-option i:first-child { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.msg-opt-arrow { margin-left: auto; font-size: 0.7rem; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
.msg-option:hover .msg-opt-arrow { opacity: 1; transform: translateX(3px); }
.msg-wa:hover { background: rgba(37,211,102,0.12); }
.msg-wa i:first-child { color: #25d366; }
.msg-li:hover { background: rgba(10,102,194,0.15); }
.msg-li i:first-child { color: #0a66c2; }
.msg-mail:hover { background: rgba(0,245,196,0.1); }
.msg-mail i:first-child { color: var(--accent); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-dark); border-top: 1px solid var(--border);
  padding: 32px 0; position: relative; z-index: 1;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--white); }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 1000;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none; color: #0a0f1a; font-size: 1rem; cursor: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
  box-shadow: 0 0 20px rgba(0,245,196,0.3);
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 0 36px rgba(0,245,196,0.5); }

/* =============================================
   CERT LIGHTBOX
   ============================================= */
.cert-card { cursor: pointer; position: relative; }
.cert-card::after {
  content: attr(data-cert-name);
  position: fixed;
  background: rgba(0, 245, 196, 0.15);
  border: 1px solid rgba(0, 245, 196, 0.3);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(8px);
  bottom: calc(100% + 48px);
  left: 50%;
  transform: translateX(-50%);
}
.cert-card:hover::after { opacity: 1; }
.cert-view-hint {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.2rem;
  opacity: 0; transition: opacity var(--transition);
  border-radius: var(--radius-sm);
}
.cert-card:hover .cert-view-hint { opacity: 1; }

.cert-lightbox {
  position: fixed; inset: 0; z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cert-lightbox.open { opacity: 1; pointer-events: all; }
.cert-lightbox-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.cert-lightbox-modal {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(860px, 95vw);
  box-shadow: 0 0 80px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.cert-lightbox.open .cert-lightbox-modal { transform: scale(1); }
.cert-lightbox-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.cert-lightbox-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem; font-weight: 700; color: var(--white);
}
.cert-lightbox-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-dark); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.cert-lightbox-close:hover { color: var(--white); border-color: var(--accent); }
.cert-lightbox-body { padding: 0; min-height: 520px; display: flex; align-items: center; justify-content: center; }
#certLightboxFrame {
  width: 100%; height: 520px;
  border: none; border-radius: 0 0 var(--radius) var(--radius);
  display: block;
  background: #fff;
}
.cert-lightbox-placeholder {
  text-align: center; color: var(--text-muted); padding: 40px;
  display: none;
}
.cert-lightbox-placeholder.show { display: block; }
.cert-lightbox-placeholder i { font-size: 3rem; margin-bottom: 12px; opacity: 0.3; }
.cert-lightbox-placeholder p { font-size: 0.9rem; margin-bottom: 6px; }
.cert-lightbox-placeholder small { font-size: 0.75rem; }
.cert-lightbox-placeholder code {
  background: var(--bg-dark); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; color: var(--accent);
}

/* Sub-cert picker */
.cert-lightbox-actions { display: flex; align-items: center; gap: 8px; }
.cert-back-btn {
  display: none; align-items: center; gap: 6px;
  background: var(--bg-dark); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.78rem;
  padding: 6px 14px; border-radius: 20px;
  cursor: pointer; transition: var(--transition);
}
.cert-back-btn.show { display: inline-flex; }
.cert-back-btn:hover { color: var(--white); border-color: var(--accent); }

.cert-sub-picker {
  padding: 20px 24px 0; display: none;
}
.cert-sub-picker.show { display: block; }
.cert-sub-picker > p {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.cert-sub-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 20px; }
.cert-sub-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  cursor: pointer; transition: var(--transition); color: var(--text);
}
.cert-sub-item:hover { border-color: var(--accent); color: var(--white); transform: translateX(4px); }
.cert-sub-item > .fa-file-pdf { color: var(--accent); font-size: 1rem; flex-shrink: 0; }
.cert-sub-item-name { font-size: 0.9rem; font-weight: 600; flex: 1; }
.cert-sub-item-arrow { color: var(--text-muted); font-size: 0.75rem; }

/* Multi-cert badge */
.cert-multi-badge {
  font-size: 0.65rem; font-weight: 800;
  background: rgba(0,245,196,0.12); border: 1px solid rgba(0,245,196,0.3);
  color: var(--accent); padding: 3px 8px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
/* =============================================
   NAV OVERLAY (mobile)
   ============================================= */
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 998;
  backdrop-filter: blur(3px);
}
.nav-overlay.show { display: block; }

/* =============================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================= */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding: 120px 6vw 80px; gap: 48px; }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .cert-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 24px; }
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) { flex-direction: column; padding: 0 0 0 64px; }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot { left: 0; right: auto; }
  .timeline-card { width: 100%; box-sizing: border-box; }
  .achieve-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-badges { justify-content: center; }
  .research-spotlight { text-align: left; }
}

/* =============================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================= */
@media (max-width: 768px) {
  /* GLOBAL CONTAINER */
  .section-container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 36px; }
  .section-title { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }

  /* NAVBAR */
  .navbar { padding: 14px 18px; }
  .navbar.scrolled { padding: 10px 18px; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(280px, 80vw);
    height: 100vh; height: 100dvh;
    background: rgba(10, 15, 26, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column; justify-content: center;
    padding: 40px 28px; gap: 24px;
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
    z-index: 999; box-shadow: -8px 0 32px rgba(0,0,0,0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1rem; min-height: 44px; display: flex; align-items: center; }
  .hamburger { display: flex; z-index: 1000; padding: 6px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* HERO */
  .hero { padding: 96px 18px 50px; text-align: center; }
  .hero-name { font-size: clamp(2.1rem, 7.5vw, 3.2rem); line-height: 1.1; margin-bottom: 14px; }
  .hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
  .hero-badge { font-size: 0.74rem; padding: 6px 14px; }
  .hero-typewriter { font-size: 0.95rem; text-align: center; margin-bottom: 16px; }
  .hero-desc { font-size: 0.92rem; line-height: 1.7; text-align: center; margin: 0 auto 24px; max-width: 95%; }
  .hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 320px; margin: 0 auto 32px; }
  .hero-actions .btn { width: 100%; justify-content: center; min-height: 48px; font-size: 0.88rem; padding: 12px 20px; }

  /* HERO STATS — 2x2 Clean Grid on Phone */
  .hero-stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 10px; width: 100%; max-width: 340px; margin: 0 auto;
  }
  .stat-divider { display: none; }
  .stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    backdrop-filter: blur(8px);
  }
  .stat-number { font-size: 1.6rem; font-weight: 700; color: var(--white); }
  .stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

  /* HERO VISUAL — Centered profile card, hide overflowing corner chips */
  .hero-visual { display: flex; justify-content: center; width: 100%; margin-top: 28px; }
  .profile-card { width: min(280px, 80vw); animation: none; }
  .pc-photo-wrap { height: 220px; }
  .chip { display: none !important; }
  .scroll-indicator { display: none; }

  /* TAGS & PILLS */
  .timeline-tags span,
  .project-stack span,
  .skill-tags-mini span,
  .pc-chip,
  .timeline-badge-current,
  .about-current-dot-pill { white-space: nowrap; }
  .highlight-text { white-space: normal; }

  /* ABOUT */
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-card { padding: 22px 16px; text-align: center; }
  .about-avatar { width: 92px; height: 92px; }
  .edu-block { padding: 14px; border-radius: 12px; gap: 12px; text-align: left; }
  .about-current-role { padding: 14px; border-radius: 12px; text-align: left; margin-top: 10px; }
  .about-intro { font-size: 0.94rem; line-height: 1.75; text-align: left; margin-bottom: 20px; }
  .about-highlights { grid-template-columns: 1fr; gap: 10px; margin-bottom: 0; }
  .highlight-item { padding: 12px 14px; gap: 12px; }
  .research-spotlight {
    margin-top: 20px; padding: 18px 16px; border-radius: 14px;
  }
  .research-spotlight p { font-size: 0.86rem; }
  .research-footer { flex-direction: column; align-items: stretch; gap: 10px; }
  .journal-badge { text-align: center; }
  .pub-doi-btn { width: 100%; justify-content: center; padding: 8px 16px; }

  /* FILTER TABS — Swipable horizontal scroll on Mobile */
  .filter-tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 18px;
    margin: 0 -18px 24px;
    justify-content: flex-start;
    display: flex;
  }
  .filter-tabs-wrap::-webkit-scrollbar { display: none; }
  .filter-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    border-radius: 40px;
    padding: 4px;
    gap: 6px;
    flex-shrink: 0;
  }
  .filter-btn {
    padding: 8px 14px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: 30px;
  }

  /* SKILLS */
  .skills-grid { grid-template-columns: 1fr; gap: 16px; }
  .skill-card { padding: 20px 16px; border-radius: 14px; }
  .skill-card-icon { width: 42px; height: 42px; font-size: 1.1rem; margin-bottom: 12px; }
  .skill-card h3 { font-size: 0.96rem; margin-bottom: 16px; }

  /* CERTS */
  .cert-cards-grid { grid-template-columns: 1fr; gap: 10px; }
  .cert-card { padding: 12px 14px; min-height: 52px; border-radius: 12px; }
  .cert-card-title { font-size: 0.82rem; }
  .certs-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* CERT LIGHTBOX */
  .cert-lightbox-modal {
    width: 96vw; height: 90vh;
    border-radius: 14px;
  }
  .cert-lightbox-header { padding: 12px 14px; }
  .cert-lightbox-title { font-size: 0.85rem; }
  #certLightboxFrame { height: 380px; }
  .cert-lightbox-body { min-height: 380px; }

  /* TIMELINE — Clean Left-Aligned Spine on Mobile */
  .timeline {
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .timeline::before {
    left: 17px !important;
    transform: none !important;
  }
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    display: block !important;
    padding: 0 0 0 46px !important;
    position: relative;
    margin-bottom: 24px;
  }
  .timeline-dot,
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 0.85rem;
    margin-top: 0;
    box-shadow: 0 0 14px rgba(0,245,196,0.25);
  }
  .timeline-logo {
    position: static !important;
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    pointer-events: auto;
    background: rgba(14, 21, 37, 0.95);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    padding: 10px 14px;
  }
  .timeline-card {
    border-radius: 0 0 14px 14px !important;
    border-top: 1px dashed rgba(255,255,255,0.08) !important;
    padding: 18px 16px !important;
    width: 100%;
    box-sizing: border-box;
  }
  .timeline-logo-box.logo-se,
  .timeline-logo-box.logo-ml,
  .timeline-logo-box.logo-renom {
    width: 130px !important;
    height: 48px !important;
    border-radius: 8px;
    box-shadow: none;
  }
  .timeline-logo-box {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px;
    box-shadow: none;
  }
  .timeline-logo-box.logo-vels {
    width: 80px !important;
    height: 48px !important;
    border-radius: 8px;
  }
  .timeline-company { font-size: 1rem; }
  .timeline-role { font-size: 0.88rem; flex-direction: column; align-items: flex-start; gap: 4px; }
  .timeline-meta { flex-direction: column; gap: 4px; }
  .timeline-desc { font-size: 0.86rem; line-height: 1.65; text-align: left; margin-bottom: 12px; }
  .timeline-tags span { font-size: 0.68rem; padding: 3px 8px; }

  /* PROJECTS */
  .projects-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-card { padding: 22px 18px; border-radius: 14px; }
  .project-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
  .project-title { font-size: 1.05rem; line-height: 1.35; }
  .project-desc { font-size: 0.86rem; line-height: 1.65; }
  .project-stack span { font-size: 0.68rem; padding: 3px 8px; }

  /* ACHIEVEMENTS & EXTRACURRICULAR */
  .achieve-grid { grid-template-columns: 1fr; gap: 12px; }
  .achieve-card { padding: 18px 16px; border-radius: 14px; }
  .extra-grid { grid-template-columns: 1fr; gap: 10px; }
  .extra-card { padding: 14px 14px; gap: 12px; border-radius: 12px; }

  /* CONTACT */
  .contact-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-item { padding: 14px 16px; min-height: 52px; border-radius: 14px; }
  .contact-value { word-break: break-all; overflow-wrap: break-word; font-size: 0.82rem; }
  .cta-card { padding: 24px 18px; border-radius: 14px; overflow: visible; }
  .msg-popup-wrap {
    position: relative; display: flex; flex-direction: column; align-items: center; width: 100%;
  }
  .msg-options {
    position: static !important;
    top: auto; bottom: auto; left: auto;
    transform: none !important;
    width: 100%; min-width: unset;
    max-height: 0; overflow: hidden;
    opacity: 0; pointer-events: none; margin-top: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border-radius: 14px;
  }
  .msg-popup-wrap.open .msg-options {
    max-height: 200px; opacity: 1; pointer-events: all; margin-top: 12px; transform: none !important;
  }

  /* FOOTER */
  .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
  .back-to-top { width: 42px; height: 42px; font-size: 0.85rem; bottom: 20px; right: 16px; }
}

/* =============================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================= */
@media (max-width: 480px) {
  .section-container { padding: 0 14px; }
  .hero { padding: 88px 14px 44px; }
  .hero-name { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  .hero-stats { gap: 8px; }
  .stat-number { font-size: 1.45rem; }
  .stat-label { font-size: 0.68rem; }
  .hero-badge { font-size: 0.7rem; padding: 5px 12px; }

  /* Cert lightbox full screen */
  .cert-lightbox-modal {
    width: 100vw; height: 100dvh; border-radius: 0;
    max-height: 100dvh; display: flex; flex-direction: column;
  }
  #certLightboxFrame { height: calc(100dvh - 58px); }
  .cert-lightbox-body { min-height: calc(100dvh - 58px); flex: 1; }
  .cert-lightbox-header { flex-shrink: 0; }

  /* Small cards & padding */
  .about-card { padding: 18px 14px; }
  .about-avatar { width: 84px; height: 84px; }
  .about-current-role { padding: 12px 14px; }
  .edu-block { padding: 12px 14px; }
  .project-card { padding: 18px 14px; }
  .skill-card { padding: 18px 14px; }
  .achieve-card { padding: 16px 14px; }
  .cta-card { padding: 20px 14px; }
  .contact-item { padding: 12px 14px; }
  .footer-inner { padding: 0 12px; }
  .footer-copy { font-size: 0.72rem; }
}

/* =============================================
   ULTRA SMALL SCREENS (max 360px)
   ============================================= */
@media (max-width: 360px) {
  .navbar { padding: 10px 12px; }
  .navbar.scrolled { padding: 8px 12px; }
  .hero { padding: 80px 10px 36px; }
  .hero-name { font-size: 1.75rem !important; }
  .hero-stats { gap: 6px; }
  .stat-number { font-size: 1.3rem; }
  .stat-item { padding: 10px 6px; }
  .section-container { padding: 0 10px; }
  .hero-badge { font-size: 0.65rem; padding: 4px 10px; }
  .nav-links { width: 88vw; }
  .hero-actions .btn { max-width: 100%; font-size: 0.82rem; }
  .timeline-card { padding: 14px 12px !important; }
  .timeline-company { font-size: 0.92rem; }
  .project-title { font-size: 0.95rem; }
}

/* =============================================
   TOUCH DEVICES — disable custom cursor, enable pointer
   ============================================= */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  .btn, .back-to-top, .cert-card, .skill-card,
  .project-card, .achieve-card, .extra-card,
  .contact-item, .hamburger { cursor: pointer; }
  .skill-card:hover,
  .project-card:hover,
  .timeline-card:hover,
  .achieve-card:hover,
  .extra-card:hover { transform: none; }
  .contact-item:hover { transform: none; }
  .cert-card:hover { transform: none; }
  .btn-primary:hover, .btn-ghost:hover { transform: none; }
  .back-to-top:hover { transform: none; }
}

/* =============================================
   REDUCED MOTION — Accessibility
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .profile-card { animation: none; }
  .badge-dot, .pc-status-dot, .about-current-dot { animation: none; }
  .scroll-wheel { animation: none; }
  #particles-canvas { display: none; }
}
