/* ============================================================
   MANTOSH SINGH PORTFOLIO — styles.css
   ============================================================ */

/* ── Variables ── */
:root {
  --bg:          #09090b;
  --bg-alt:      #121214;
  --surface:     rgba(255,255,255,0.03);
  --surface-h:   rgba(255,255,255,0.08);
  --border:      rgba(255,255,255,0.08);
  --border-h:    rgba(255,255,255,0.20);
  --text:        #ffffff;
  --text-muted:  #a1a1aa;
  --accent:      #3b82f6;
  --accent2:     #8b5cf6;
  --accent3:     #ec4899;
  --accent-glow: rgba(59,130,246,0.3);
  --green:       #10b981;
  --yellow:      #f59e0b;
  --red:         #ef4444;
  --radius:      14px;
  --radius-lg:   20px;
  --shadow:      0 8px 30px rgba(0,0,0,0.5);
  --shadow-lg:   0 20px 50px rgba(0,0,0,0.7);
  --nav-h:       68px;
  --transition:  0.3s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg:          #fafafa;
  --bg-alt:      #f4f4f5;
  --surface:     #ffffff;
  --surface-h:   #f1f5f9;
  --border:      rgba(0,0,0,0.06);
  --border-h:    rgba(0,0,0,0.12);
  --text:        #09090b;
  --text-muted:  #71717a;
  --accent:      #2563eb;
  --accent2:     #9333ea;
  --accent-glow: rgba(37,99,235,0.2);
  --shadow:      0 8px 30px rgba(0,0,0,0.04);
  --shadow-lg:   0 20px 40px rgba(0,0,0,0.08);
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59,130,246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(139,92,246, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.75;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}
body.no-scroll { overflow: hidden; height: 100vh; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Utilities ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.accent { color: var(--accent); }
.highlight { color: var(--accent); font-weight: 600; }

/* ── NAVBAR ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.nav-brand {
  font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; gap: 12px;
  cursor: default;
}
.brand-logo {
  width: 32px; height: 32px;
  transition: transform var(--transition), filter var(--transition);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.nav-brand:hover .brand-logo {
  transform: scale(1.1) rotate(-5deg);
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(0.85)} }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--accent);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--transition);
}
.theme-toggle:hover { background: var(--surface-h); border-color: var(--border-h); }
.sun-icon, .moon-icon { position: absolute; transition: opacity var(--transition), transform var(--transition); }
[data-theme="light"] .sun-icon { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .moon-icon { opacity: 1; transform: rotate(0); }
.moon-icon { opacity: 0; transform: rotate(-90deg); }
.sun-icon { opacity: 1; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; background: none;
  border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all var(--transition);
}
.nav-mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
  padding: 16px 0; flex-direction: column;
}
.nav-mobile-menu.open { display: flex; }
.mobile-link {
  padding: 12px 32px; font-weight: 500;
  color: var(--text-muted); transition: color var(--transition);
}
.mobile-link:hover { color: var(--text); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: var(--nav-h);
}
#particleCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  flex: 1; max-width: 620px;
  padding: 60px 0 60px 60px;
}
.hero-top-badges {
  display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--green);
  padding: 6px 14px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 500;
}
.time-badge { background: var(--surface); border-color: var(--border); color: var(--text-muted); }
.time-badge svg { width: 14px; height: 14px; stroke: var(--accent); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: pulse 2s infinite;
}
.hero-name { margin-bottom: 16px; }
.hello { display: block; font-size: 1.1rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.name-text {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.15; letter-spacing: -0.03em;
  background: linear-gradient(to right, #ffffff 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .name-text {
  background: linear-gradient(to right, #0f172a 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.hero-roles {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 600; margin-bottom: 20px;
  min-height: 2.2rem;
}
.role-static { color: var(--text-muted); font-weight: 400; }
.typed-wrapper { display: flex; align-items: center; }
.typed-text { color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.typed-cursor {
  color: var(--accent); font-weight: 300;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 50%{opacity:0} }
.hero-desc {
  color: var(--text-muted); font-size: 1rem; line-height: 1.75;
  margin-bottom: 32px; max-width: 520px;
}
.hero-desc strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px;
  font-size: 0.9rem; font-weight: 600;
  transition: all var(--transition); cursor: pointer;
  border: none; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.4);
}
.btn-outline {
  background: var(--surface);
  border: 1px solid var(--border-h);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--surface-h);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-full { width: 100%; justify-content: center; }
.btn-icon { width: 18px; height: 18px; }

.hero-socials { display: flex; gap: 12px; flex-wrap: wrap; }
.social-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 8px;
  font-size: 0.8rem; color: var(--text-muted);
  transition: all var(--transition);
}
.social-chip svg { width: 14px; height: 14px; }
.social-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-h); }

/* Hero Visual */
.hero-visual {
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 32px;
  padding: 60px 60px 60px 0;
}

/* Hero profile photo */
.hero-profile-wrap {
  position: relative;
  width: 160px; height: 160px; flex-shrink: 0;
}
.hero-profile-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: rotateBorder 6s linear infinite;
}
.hero-profile-ring.ring2 {
  inset: -16px; border-width: 1px; opacity: 0.4;
  animation-duration: 10s; animation-direction: reverse;
}
@keyframes rotateBorder { to { transform: rotate(360deg); } }
.hero-profile-img {
  width: 160px; height: 160px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 3px solid var(--border);
  box-shadow: 0 8px 40px rgba(99,102,241,0.35);
  display: block;
}
.code-block {
  border-radius: var(--radius-lg);
  overflow: hidden; max-width: 400px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  transform: perspective(800px) rotateY(-5deg) rotateX(3deg);
  transition: transform var(--transition);
}
.code-block:hover { transform: perspective(800px) rotateY(0) rotateX(0); }
.code-header {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.code-title { margin-left: 8px; font-size: 0.78rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.code-body {
  padding: 20px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; line-height: 1.75;
  color: #cdd6f4; overflow-x: auto;
  white-space: pre;
}
.kw { color: #cba6f7; }
.cls { color: #89b4fa; }
.fn  { color: #89dceb; }
.str { color: #a6e3a1; }
.num { color: #fab387; }
.cmt { color: #585b70; }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 36px; left: 60px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.1em;
}
.scroll-line {
  width: 40px; height: 1px; background: var(--text-muted);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%; background: var(--accent);
  animation: scrollLine 2s ease infinite;
}
@keyframes scrollLine { to { left: 100%; } }

/* ── SECTIONS ── */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.2;
}
.section-subheader {
  font-size: 1.1rem; font-weight: 700; color: var(--text-muted);
  margin-bottom: 24px; letter-spacing: 0.05em; text-transform: uppercase;
  font-size: 0.8rem;
}

/* ── ABOUT ── */
.about-grid {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 60px; align-items: start;
}
.avatar-card {
  border-radius: var(--radius-lg); padding: 32px 24px;
  text-align: center; position: sticky; top: calc(var(--nav-h) + 24px);
}
.avatar-inner {
  width: 160px; height: 160px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 40px rgba(99,102,241,0.4);
  overflow: hidden;
  border: 3px solid var(--border);
  position: relative;
}
.avatar-photo {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.avatar-initials {
  font-size: 2.2rem; font-weight: 900; color: #fff;
  font-family: 'JetBrains Mono', monospace;
}
.avatar-fallback { display: none; }
.avatar-stats {
  display: flex; gap: 16px; justify-content: center; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.stat-item { text-align: center; flex: 1; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat-label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

.about-text p {
  margin-bottom: 16px; color: var(--text-muted); line-height: 1.8;
}
.about-lead { font-size: 1.05rem; color: var(--text); }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag {
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── SKILLS ── */
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 60px;
}
.skill-category {
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition);
}
.skill-category:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.skill-cat-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.skill-cat-icon svg { width: 22px; height: 22px; stroke: var(--accent); }
.skill-category h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 20px; }

.skill-bars { display: flex; flex-direction: column; gap: 12px; }
.skill-bar-item span { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 5px; }
.bar { height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* Tech cloud */
.tech-tags-section { text-align: center; }
.tech-tags-title {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px;
}
.tech-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-pill {
  padding: 7px 16px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition); cursor: default;
}
.tier1 {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.3); color: #a5b4fc;
}
.tier2 {
  background: rgba(6,182,212,0.1);
  border-color: rgba(6,182,212,0.25); color: #67e8f9;
}
.tier3 {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.25); color: #6ee7b7;
}
[data-theme="light"] .tier1 { color: var(--accent); border-color: rgba(99,102,241,0.4); }
[data-theme="light"] .tier2 { color: #0891b2; border-color: rgba(6,182,212,0.35); }
[data-theme="light"] .tier3 { color: #059669; border-color: rgba(16,185,129,0.35); }
.tech-pill:hover { transform: translateY(-2px) scale(1.04); }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 40px; margin-bottom: 60px; z-index: 1; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--surface-h); z-index: -1;
}
.timeline-svg {
  position: absolute; left: 0; top: 0;
  width: 2px; height: 100%;
  z-index: 0; pointer-events: none;
}
.timeline-path {
  stroke: var(--accent);
  stroke-width: 2px;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  transition: stroke-dashoffset 0.1s ease-out;
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-marker {
  position: absolute; left: -46px; top: 24px;
  width: 14px; height: 14px;
}
.marker-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0.4;
  animation: ringPulse 2s infinite;
}
.marker-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px var(--accent-glow);
}
@keyframes ringPulse { 0%,100%{transform:scale(1);opacity:0.4} 50%{transform:scale(1.6);opacity:0} }

.timeline-card { border-radius: var(--radius-lg); padding: 28px 32px; }
.timeline-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.timeline-role { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.timeline-company { font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.timeline-date {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 6px; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}
.timeline-bullets { padding-left: 0; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.timeline-bullets li {
  position: relative; padding-left: 16px; color: var(--text-muted); font-size: 0.9rem;
}
.timeline-bullets li::before {
  content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 0.8rem;
}
.timeline-techs { display: flex; flex-wrap: wrap; gap: 8px; }
.t-tag {
  font-size: 0.75rem; font-weight: 500;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc; padding: 3px 10px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
[data-theme="light"] .t-tag { color: var(--accent); }

/* Education */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.edu-card {
  border-radius: var(--radius); padding: 24px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: all var(--transition);
}
.edu-card:hover { border-color: var(--border-h); transform: translateY(-3px); }
.edu-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(99,102,241,0.12); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.edu-icon svg { width: 22px; height: 22px; stroke: var(--accent); }
.edu-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.edu-inst { display: block; font-size: 0.82rem; color: var(--accent); margin-bottom: 3px; }
.edu-year { font-size: 0.78rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* ── PROJECTS ── */
.projects-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
.project-card {
  border-radius: var(--radius-lg); padding: 32px;
  position: relative; overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 20px;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity var(--transition);
}
.project-card.reveal.visible:hover { 
  transform: translateY(-8px); 
  box-shadow: 0 24px 50px rgba(0,0,0,0.6), 0 0 40px var(--accent-glow); 
  border-color: var(--accent); 
}
.project-card:hover::before { opacity: 1; }

.project-num {
  font-size: 3rem; font-weight: 900; color: rgba(99,102,241,0.12);
  font-family: 'JetBrains Mono', monospace; line-height: 1;
  position: absolute; top: 20px; right: 24px;
  transition: all var(--transition);
}
.project-card:hover .project-num { color: rgba(59,130,246,0.3); transform: scale(1.1); }
.project-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.project-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.project-highlights {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px;
}
.project-highlights li {
  position: relative; padding-left: 16px;
  font-size: 0.82rem; color: var(--text-muted);
}
.project-highlights li::before {
  content: '▸'; position: absolute; left: 0; color: var(--accent); font-size: 0.7rem; top: 1px;
}
.project-tags {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto;
}
.project-tags span {
  font-size: 0.72rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  transition: all var(--transition);
}
.project-card:hover .project-tags span { border-color: rgba(99,102,241,0.25); color: #a5b4fc; }
[data-theme="light"] .project-card:hover .project-tags span { color: var(--accent); }

.project-category {
  position: absolute; top: 20px; left: 32px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.cat-java { background: rgba(251,146,60,0.1); color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }
.cat-python { background: rgba(6,182,212,0.1); color: #06b6d4; border: 1px solid rgba(6,182,212,0.25); }
.cat-ai { background: rgba(139,92,246,0.1); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
.project-content { padding-top: 30px; }

/* ── SKELETON LOADING STATES ── */
.is-loading * { pointer-events: none !important; }
.is-loading .project-title,
.is-loading .project-desc,
.is-loading .project-highlights li,
.is-loading .project-tags span,
.is-loading .project-category,
.is-loading .project-num {
  color: transparent !important;
  background: linear-gradient(90deg, var(--surface-h) 25%, var(--border-h) 50%, var(--surface-h) 75%) !important;
  background-size: 200% 100% !important;
  animation: skeleton-loading 1.5s infinite linear;
  border-radius: 6px;
  border-color: transparent !important;
}
.is-loading .project-highlights li { margin-bottom: 8px; }
.is-loading .project-highlights li::before { display: none; }
.is-loading .featured-badge { display: none; }

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.featured-project {
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06)) !important;
  border-color: rgba(139,92,246,0.2) !important;
}
.featured-badge {
  position: absolute; top: 20px; right: 80px;
  font-size: 0.68rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; padding: 3px 10px; border-radius: 50px;
}

/* ── CONTACT ── */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-lead { font-size: 1.05rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 32px; }
.contact-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  display: flex; align-items: center; gap: 16px;
  border-radius: var(--radius); padding: 18px 20px;
  transition: all var(--transition);
}
.contact-card:not(.no-link):hover { border-color: var(--accent); transform: translateX(6px); }
.cc-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(99,102,241,0.12); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.cc-icon svg { width: 20px; height: 20px; stroke: var(--accent); }
.cc-label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.cc-value { font-size: 0.9rem; font-weight: 600; }

.contact-form { border-radius: var(--radius-lg); padding: 36px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.04em;
}
.form-group input, .form-group textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 12px 16px;
  font-size: 0.9rem; font-family: inherit;
  transition: all var(--transition); outline: none; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
.form-note { font-size: 0.82rem; text-align: center; margin-top: 12px; min-height: 20px; }
.form-note.success { color: var(--green); }
.form-note.error { color: var(--red); }

/* ── FOOTER ── */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { text-align: center; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.1rem; font-weight: 800; margin-bottom: 8px;
}
.footer-tagline, .footer-copy { color: var(--text-muted); font-size: 0.85rem; }
.footer-tagline { margin-bottom: 6px; }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 50;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(20px);
  transition: all var(--transition); box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(99,102,241,0.5); }
.back-to-top svg { width: 20px; height: 20px; stroke: #fff; }

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .avatar-card { position: static; max-width: 380px; margin: 0 auto; }
}

@media (max-width: 900px) {
  #hero { flex-direction: column; padding-top: var(--nav-h); }
  .hero-content { padding: 60px 24px 0; }
  .hero-visual { padding: 32px 24px 60px; flex-direction: row; gap: 24px; flex-wrap: wrap; justify-content: center; }
  .code-block { transform: none; max-width: 360px; }
  .scroll-hint { left: 24px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .hero-profile-wrap { width: 120px; height: 120px; }
  .hero-profile-img { width: 120px; height: 120px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  #navbar { padding: 0 20px; }
  .section { padding: 70px 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 28px; }
  .timeline-header { flex-direction: column; }
  .timeline-date { align-self: flex-start; }
  .hero-content { padding: 40px 20px 0; }
  .hero-visual { padding: 32px 20px 50px; }
  .featured-badge { display: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-socials { flex-direction: column; }
  .hero-roles { font-size: 1.1rem; }
  .contact-form { padding: 24px; }
  .timeline-card { padding: 20px; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.5); }

/* ── SELECTION ── */
::selection { background: rgba(99,102,241,0.3); color: var(--text); }

/* ── CUSTOM CURSOR ── */
@media (hover: hover) and (pointer: fine) {
  body, a, button, input, textarea, .btn, .theme-toggle, .nav-hamburger {
    cursor: none !important;
  }
  .cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 6px; height: 6px; margin: -3px 0 0 -3px;
    background: var(--accent); border-radius: 50%;
    pointer-events: none; z-index: 10000;
    opacity: 0; transition: opacity 0.2s ease;
  }
  .cursor-trail {
    position: fixed; top: 0; left: 0;
    width: 32px; height: 32px; margin: -16px 0 0 -16px;
    border: 1.5px solid var(--accent); border-radius: 50%;
    pointer-events: none; z-index: 9999; opacity: 0;
    transition: width 0.2s ease, height 0.2s ease, margin 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  }
  .cursor-trail.hover {
    width: 48px; height: 48px; margin: -24px 0 0 -24px;
    background: var(--accent-glow); border-color: var(--accent2);
  }
}
@media (hover: none) or (pointer: coarse) {
  .cursor-dot, .cursor-trail { display: none !important; }
}

/* ── AI CHATBOT DEMO ── */
.chat-toggle-btn {
  position: fixed; bottom: 28px; left: 28px; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-toggle-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 28px rgba(99,102,241,0.5); }
.chat-toggle-btn svg { width: 22px; height: 22px; }
.chat-toggle-btn.hidden { opacity: 0; pointer-events: none; transform: scale(0.5); }

.chat-window {
  position: fixed; bottom: 28px; left: 28px; z-index: 50;
  width: 350px; height: 480px; max-height: calc(100vh - 120px);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transform-origin: bottom left; transform: scale(0); opacity: 0; pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  box-shadow: var(--shadow-lg);
}
.chat-window.open { transform: scale(1); opacity: 1; pointer-events: auto; }

.chat-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.2);
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.chat-avatar svg { width: 20px; height: 20px; }
.chat-header-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.chat-header-info span { font-size: 0.7rem; color: var(--green); display: flex; align-items: center; gap: 4px; }
.chat-header-info span::before { content:''; display:inline-block; width:6px; height:6px; background:var(--green); border-radius:50%; animation: pulse 2s infinite; }
.chat-close-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color var(--transition); display: flex; align-items: center; justify-content: center; }
.chat-close-btn:hover { color: var(--text); }
.chat-close-btn svg { width: 20px; height: 20px; }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 0.85rem; line-height: 1.5; animation: chatPop 0.3s cubic-bezier(0.17,0.89,0.32,1.28); }
@keyframes chatPop { 0%{transform:scale(0.9) translateY(10px);opacity:0} 100%{transform:scale(1) translateY(0);opacity:1} }
.chat-msg.ai { align-self: flex-start; background: var(--surface-h); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-bottom-right-radius: 4px; }
.chat-typing { display: flex; gap: 4px; padding: 4px 8px; align-items: center; height: 24px; }
.chat-typing span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: typingBlink 1.4s infinite both; }
.chat-typing span:nth-child(1) { animation-delay: 0s; } .chat-typing span:nth-child(2) { animation-delay: 0.2s; } .chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBlink { 0%,80%,100%{opacity:0.3;transform:scale(0.8)} 40%{opacity:1;transform:scale(1)} }

/* ── PRELOADER ── */
.preloader {
  position: fixed; inset: 0; z-index: 999999;
  background: #040814; /* Deep terminal background */
  display: flex; flex-direction: column; justify-content: center; padding-left: 12%;
  transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}
.preloader.hidden { transform: translateY(-100%); }
.terminal-loader {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(1rem, 3vw, 1.4rem);
  color: #a5b4fc; display: flex; flex-direction: column; gap: 8px;
}
.term-line { min-height: 1.5rem; }
.term-active { color: var(--accent); font-weight: 600; }
.terminal-cursor { display: inline-block; width: 10px; height: 1.2em; background: currentColor; margin-left: 4px; vertical-align: middle; animation: termBlink 1s step-end infinite; }
@keyframes termBlink { 50% { opacity: 0; } }

@media (max-width: 480px) {
  .chat-window { width: calc(100vw - 40px); left: 20px; right: 20px; bottom: 20px; }
  .chat-toggle-btn { left: 20px; bottom: 20px; }
}
