/* ===========================
   CSS CUSTOM PROPERTIES
=========================== */
:root,
[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-alt: #0e0e16;
  --surface: #13131e;
  --surface-2: #1a1a2a;
  --border: rgba(167, 139, 250, 0.12);
  --border-hover: rgba(167, 139, 250, 0.3);

  --text: #e8e8f0;
  --text-muted: #8888a8;
  --text-faint: #4a4a6a;

  --accent: #a78bfa;
  --accent-2: #818cf8;
  --accent-glow: rgba(167, 139, 250, 0.25);
  --accent-gradient: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #38bdf8 100%);
  --nav-overlay: rgba(10, 10, 15, 0.88);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;

  --nav-h: 72px;
  --section-gap: 120px;
  --container-w: 1160px;

  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-alt: #eeeef6;
  --surface: #ffffff;
  --surface-2: #f0f0f8;
  --border: rgba(109, 40, 217, 0.12);
  --border-hover: rgba(109, 40, 217, 0.3);

  --text: #111118;
  --text-muted: #55556a;
  --text-faint: #9999b0;

  --accent: #7c3aed;
  --accent-2: #4f46e5;
  --accent-glow: rgba(124, 58, 237, 0.18);
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0ea5e9 100%);
  --nav-overlay: rgba(245, 245, 250, 0.90);
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  transition: background-color 0.35s var(--ease-smooth), color 0.35s var(--ease-smooth);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img, svg {
  display: block;
}

button {
  cursor: none;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===========================
   NOISE TEXTURE
=========================== */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===========================
   CUSTOM CURSOR
=========================== */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.05s, background 0.2s, width 0.2s var(--ease-bounce), height 0.2s var(--ease-bounce);
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(167, 139, 250, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-smooth), width 0.3s var(--ease-bounce), height 0.3s var(--ease-bounce), border-color 0.2s;
}

body.cursor-hover .cursor { width: 16px; height: 16px; }
body.cursor-hover .cursor-follower { width: 52px; height: 52px; border-color: var(--accent); }

/* Hide custom cursor on touch / mobile devices */
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-follower { display: none !important; }
  body { cursor: auto; }
  button { cursor: pointer; }
}

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===========================
   NAVIGATION
=========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 60px);
  transition: background 0.4s var(--ease-smooth), backdrop-filter 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
  background: var(--nav-overlay);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 99px;
  transform: translateX(-50%);
  transition: width 0.3s var(--ease-bounce);
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 60%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Theme toggle button ── */
.theme-toggle {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-bounce);
  cursor: none;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: rotate(20deg) scale(1.05);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  position: absolute;
  transition: opacity 0.25s, transform 0.35s var(--ease-bounce);
}

/* Dark mode → show moon, hide sun */
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* Light mode → show sun, hide moon */
[data-theme="light"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===========================
   CONTAINER
=========================== */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(167,139,250,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(56,189,248,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 50% at 10% 60%, rgba(129,140,248,0.08) 0%, transparent 50%);
}

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) clamp(20px, 4vw, 60px) 80px;
  min-height: 100dvh;
  gap: 48px;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
}

.hero-blob-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#blobContainer {
  width: 480px;
  height: 480px;
  max-width: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: visible;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
  50% { box-shadow: 0 0 0 7px rgba(34,197,94,0.1); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.title-line {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-muted);
  font-weight: 400;
}

.title-name {
  font-size: clamp(3rem, 8vw, 6.5rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 2em;
  font-weight: 400;
}

.cursor-blink {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero-socials {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.social-link {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-bounce);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-3px);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.hero-scroll {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease-bounce);
}

.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* ===========================
   SECTIONS
=========================== */
.section {
  padding: var(--section-gap) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.section-title em {
  font-style: normal;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   REVEAL ANIMATIONS
=========================== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal-up.revealed, .reveal-left.revealed, .reveal-right.revealed {
  opacity: 1;
  transform: translate(0);
}

/* stagger children */
.reveal-up:nth-child(2) { transition-delay: 0.08s; }
.reveal-up:nth-child(3) { transition-delay: 0.16s; }
.reveal-up:nth-child(4) { transition-delay: 0.24s; }
.reveal-up:nth-child(5) { transition-delay: 0.32s; }

/* ===========================
   ABOUT
=========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}

.about-card-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.about-avatar {
  width: 200px;
  height: 200px;
  margin: 0 auto 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--accent-gradient);
  z-index: -1;
  animation: rotate-border 4s linear infinite;
}

@keyframes rotate-border {
  to { transform: rotate(360deg); }
}

.avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--accent);
}

.avatar-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.4;
}

.avatar-placeholder span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s var(--ease-bounce);
}

.stat-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-suffix {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.85;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.cert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
  padding: 6px 14px;
  border-radius: 99px;
  transition: background 0.2s, border-color 0.2s;
}

.cert-chip:hover { background: rgba(167,139,250,0.15); }
.cert-chip svg { width: 13px; height: 13px; }

/* ===========================
   TIMELINE
=========================== */
.timeline {
  position: relative;
  padding-left: 32px;
  margin-bottom: 72px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -31px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-alt);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(167,139,250,0.18);
  transition: box-shadow 0.3s;
  z-index: 1;
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 8px rgba(167,139,250,0.15);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color 0.3s, transform 0.3s var(--ease-bounce), box-shadow 0.3s;
}

.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 0 1px var(--border-hover);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-meta {
  text-align: right;
}

.timeline-period {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-location {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.timeline-bullets {
  margin-bottom: 20px;
}

.timeline-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.timeline-bullets li strong {
  color: var(--text);
  font-weight: 600;
}

/* ===========================
   EDUCATION
=========================== */
.edu-section {}
.edu-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edu-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.3s, transform 0.2s var(--ease-bounce);
}

.edu-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.edu-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.edu-icon svg { width: 22px; height: 22px; }

.edu-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.4;
}

.edu-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.edu-card span {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ===========================
   PROJECTS
=========================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s, transform 0.3s var(--ease-bounce), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease-out-expo);
  transform-origin: left;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card-placeholder {
  opacity: 0.7;
}

.placeholder-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 99px;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-icon {
  width: 44px;
  height: 44px;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.project-icon svg { width: 22px; height: 22px; }

.project-links { display: flex; gap: 10px; }

.project-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.project-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.project-link svg { width: 16px; height: 16px; }

.project-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.project-highlights {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-highlights li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.project-highlights li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-period {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

/* ===========================
   TAGS
=========================== */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-2);
  background: rgba(129,140,248,0.1);
  border: 1px solid rgba(129,140,248,0.18);
  padding: 3px 10px;
  border-radius: 6px;
}

/* ===========================
   SKILLS
=========================== */
.skills-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, transform 0.2s var(--ease-bounce);
}

.skill-group:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-group-icon {
  width: 40px;
  height: 40px;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-group-icon svg { width: 20px; height: 20px; }

.skill-group-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-bounce);
}

.skill-pill:hover {
  color: var(--accent);
  border-color: rgba(167,139,250,0.35);
  background: rgba(167,139,250,0.08);
  transform: translateY(-2px);
}

/* ── Skill proficiency bars ── */
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-bar-item {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: 10px;
}

.skill-bar-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-bar-track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.skill-bar-fill {
  height: 100%;
  width: 0;              /* starts at 0, animated by JS */
  border-radius: 99px;
  background: var(--accent-gradient);
  transition: width 0.9s var(--ease-out-expo);
}

.skill-bar-pct {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── Form submit spinner ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ===========================
   CONTACT
=========================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, transform 0.2s var(--ease-bounce), background 0.2s;
}

.contact-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  background: rgba(167,139,250,0.04);
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item-icon svg { width: 18px; height: 18px; }

.contact-item-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.contact-item-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* Contact Form */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: none;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-faint);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-note {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.5;
}

/* label row with counter */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.char-counter {
  font-size: 0.72rem;
  color: var(--text-faint);
  transition: color 0.2s;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.char-counter.warn  { color: #f59e0b; }
.char-counter.limit { color: #dc2626; font-weight: 600; }

/* inline field error */
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #dc2626;
  margin-top: 4px;
  padding-left: 2px;
  animation: errShake 0.3s var(--ease-bounce);
}

@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

/* highlight invalid input/textarea */
.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-status {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.form-status--success {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
}

.form-status--error {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}

.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-socials a svg { width: 16px; height: 16px; }

/* ===========================
   TIMELINE TAGS (timeline-card)
=========================== */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  :root { --section-gap: 80px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-card-wrap { position: static; }
  .about-avatar { width: 140px; height: 140px; }

  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .edu-grid { grid-template-columns: 1fr; }
}

/* ===========================
   MOBILE OVERLAY
=========================== */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: var(--nav-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  animation: fadeInOverlay 0.25s ease;
}

.mobile-overlay.open {
  display: flex;
}

@keyframes fadeInOverlay {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mobile-nav-link {
  display: block;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 12px 28px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
  text-align: center;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  color: var(--text);
  background: rgba(167, 139, 250, 0.08);
}

@media (max-width: 680px) {
  .nav-links { display: none !important; }
  .nav-toggle { display: flex; position: relative; z-index: 9999; }
  .theme-toggle { cursor: pointer; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 60px;
    justify-items: center;
  }

  .hero-content { text-align: center; }
  .hero-title { align-items: center; }
  .hero-desc { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }

  .hero-scroll { display: none; }

  .hero-blob-wrap { display: none; }

  .hero-actions { flex-direction: column; align-items: center; }
  .timeline { padding-left: 20px; }
  .timeline::before { left: 4px; }
  .timeline-dot { left: -21px; }
  .timeline-header { flex-direction: column; gap: 8px; }
  .timeline-meta { text-align: left; }
  .contact-form-wrap { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-layout { grid-template-columns: 1fr; }
}

/* ===========================
   SELECTION
=========================== */
::selection {
  background: rgba(167,139,250,0.3);
  color: #fff;
}


.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

body {
  visibility: visible;
}
