/* ===== RESET & ROOT ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --purple: #8b5cf6;
  --violet: #7c3aed;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --grad: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

/* ===== CANVAS BG ===== */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 10px; height: 10px;
  background: var(--purple);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: background 0.2s;
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 2px solid rgba(139,92,246,0.5);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: all 0.12s ease;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 1rem 0;
  transition: all 0.3s;
}
.navbar.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800;
  text-decoration: none; color: var(--text);
  letter-spacing: -0.5px;
}
.logo-bracket { color: var(--purple); }
.nav-links {
  list-style: none; display: flex; gap: 2.5rem;
}
.nav-link {
  text-decoration: none; color: var(--muted);
  font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--grad); border-radius: 2px;
  transition: width 0.3s;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s;
}

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: all 0.3s; font-family: 'Outfit', sans-serif;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 0 30px rgba(139,92,246,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(139,92,246,0.6);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
  background: var(--glass); border-color: var(--purple);
}
.btn-outline {
  background: transparent; color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-outline:hover { background: var(--purple); color: #fff; }
.w-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  padding: 7rem 2rem 4rem;
  max-width: 1200px; margin: 0 auto;
  position: relative; gap: 3rem;
}
.hero-content { flex: 1; z-index: 1; }
.hero-greeting {
  color: var(--cyan); font-weight: 500;
  font-size: 1.1rem; margin-bottom: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900; line-height: 1.05;
  margin-bottom: 0.5rem; letter-spacing: -2px;
}
.name-highlight {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-typewriter {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600; margin-bottom: 1.5rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  min-height: 2.5rem;
}
.typewriter-cursor {
  animation: blink 1s step-end infinite;
  color: var(--purple);
}
@keyframes blink { 50% { opacity: 0; } }
.hero-desc {
  color: var(--muted); font-size: 1.1rem;
  line-height: 1.8; max-width: 520px; margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats {
  display: flex; align-items: center; gap: 1.5rem;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem; font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-plus { color: var(--purple); font-weight: 700; font-size: 1.2rem; }
.stat-label { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: var(--glass-border); }

/* ===== HERO VISUAL ===== */
.hero-visual { flex: 1; display: flex; justify-content: center; z-index: 1; }
.avatar-container {
  position: relative; width: 340px; height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.avatar-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid;
}
.ring-1 {
  width: 300px; height: 300px;
  border-color: rgba(139,92,246,0.3);
  animation: spin 20s linear infinite;
}
.ring-2 {
  width: 240px; height: 240px;
  border-color: rgba(6,182,212,0.3);
  animation: spin 15s linear infinite reverse;
}
.ring-3 {
  width: 180px; height: 180px;
  border-color: rgba(236,72,153,0.2);
  animation: spin 10s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-img {
  width: 130px; height: 130px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(139,92,246,0.4);
  overflow: hidden;
}
.avatar-img svg { width: 100%; height: 100%; }
.floating-badge {
  position: absolute;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.badge-1 { top: 20px; right: 0; animation: float1 3s ease-in-out infinite; }
.badge-2 { bottom: 60px; left: 0; animation: float2 4s ease-in-out infinite; }
.badge-3 { bottom: 10px; right: 20px; animation: float1 3.5s ease-in-out infinite 0.5s; }
@keyframes float1 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes float2 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(10px)} }
.badge-icon { margin-right: 4px; }
.scroll-indicator {
  position: absolute; bottom: -4rem; left: 52%;
  transform: translateX(-50%);
  text-align: center; color: var(--muted); font-size: 0.8rem;
}
.scroll-arrow {
  width: 20px; height: 30px;
  border: 2px solid rgba(139,92,246,0.4);
  border-radius: 12px; margin: 0.5rem auto 0;
  position: relative;
}
.scroll-arrow::after {
  content: ''; position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--purple); border-radius: 2px;
  animation: scrollDown 1.5s ease-in-out infinite;
}
@keyframes scrollDown { 0%{opacity:1;transform:translateX(-50%) translateY(0)} 100%{opacity:0;transform:translateX(-50%) translateY(10px)} }

/* ===== SECTIONS ===== */
.section { padding: 7rem 0; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  color: var(--purple);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem; font-weight: 500;
  display: block; margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -1px;
}
.section-sub { color: var(--muted); margin-top: 0.75rem; font-size: 1.1rem; }

/* ===== ABOUT ===== */
.about { background: linear-gradient(180deg, transparent, rgba(139,92,246,0.03), transparent); }
.about-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1.5rem; margin-bottom: 4rem;
}
.about-card {
  padding: 2rem; text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.about-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(139,92,246,0.15);
}
.about-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.about-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; }
.about-card p { color: var(--muted); line-height: 1.7; font-size: 0.95rem; }
.about-story {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
}
.story-text h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.story-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.story-code { padding: 0; overflow: hidden; }
.code-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--glass-border);
}
.dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-title { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; font-family: 'JetBrains Mono', monospace; }
.code-body { padding: 1.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; line-height: 1.8; }
.c-keyword { color: #c084fc; }
.c-var { color: #67e8f9; }
.c-prop { color: #a5f3fc; }
.c-str { color: #86efac; }
.c-bool { color: #fb923c; }

/* ===== SKILLS ===== */
.skills { background: linear-gradient(180deg, transparent, rgba(6,182,212,0.03), transparent); }
.skills-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1.5rem; margin-bottom: 3rem;
}
.skill-category { padding: 2rem; }
.skill-cat-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.cat-icon { font-size: 1.3rem; }
.skill-list { display: flex; flex-direction: column; gap: 1rem; }
.skill-info {
  display: flex; justify-content: space-between;
  margin-bottom: 0.4rem; font-size: 0.9rem;
}
.skill-pct { color: var(--purple); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.skill-bar {
  height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.skill-fill {
  height: 100%; width: 0;
  background: var(--grad);
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.tech-icons {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
}
.tech-tag {
  padding: 0.5rem 1.2rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 30px; font-size: 0.85rem; font-weight: 500;
  cursor: default;
  transition: all 0.3s;
}
.tech-tag:hover {
  border-color: var(--purple);
  background: rgba(139,92,246,0.1);
  transform: translateY(-2px);
}

/* ===== PROJECTS ===== */
.projects { background: linear-gradient(180deg, transparent, rgba(236,72,153,0.03), transparent); }
.projects-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1.5rem;
}
.project-card {
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
.project-img {
  height: 180px; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.project-icon { font-size: 3.5rem; z-index: 1; }
.project-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.project-card:hover .project-overlay { opacity: 1; }
.proj-link {
  padding: 0.5rem 1.2rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 30px; color: #fff;
  text-decoration: none; font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.proj-link:hover { background: var(--purple); border-color: var(--purple); }
.project-info { padding: 1.5rem; }
.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.ptag {
  padding: 0.25rem 0.75rem;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 30px; font-size: 0.75rem;
  color: var(--purple); font-weight: 600;
}
.project-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-info p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ===== CONTACT ===== */
.contact { background: linear-gradient(180deg, transparent, rgba(139,92,246,0.05), transparent); }
.contact-wrapper {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 2.5rem; align-items: start;
}
.contact-card { padding: 2rem; height: 100%; }
.contact-card h3, .contact-form h3 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem;
}
.contact-items { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem; border-radius: 12px;
  text-decoration: none; color: var(--text);
  transition: background 0.2s;
}
.contact-item:hover { background: rgba(139,92,246,0.1); }
.ci-icon { font-size: 1.5rem; min-width: 36px; text-align: center; }
.contact-item small { color: var(--muted); font-size: 0.75rem; }
.contact-item p { font-size: 0.9rem; font-weight: 500; }
.availability {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 12px; font-size: 0.85rem; color: #4ade80;
}
.avail-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.contact-form { padding: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.85rem;
  color: var(--muted); margin-bottom: 0.5rem; font-weight: 500;
}
.form-group input, .form-group textarea {
  width: 100%; padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px; color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: 0.95rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--muted); }
.form-success {
  display: none; margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 12px; color: #4ade80;
  text-align: center; font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  position: relative; z-index: 1;
}
.footer-content {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-size: 1.3rem; font-weight: 800; }
.footer p { color: var(--muted); font-size: 0.9rem; }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a {
  font-size: 1.3rem; text-decoration: none;
  transition: transform 0.2s; display: block;
}
.footer-socials a:hover { transform: scale(1.2) translateY(-2px); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0; transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.revealed { opacity: 1 !important; transform: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero { flex-direction: column; text-align: center; padding: 6rem 1.5rem 3rem; }
  .hero-visual { order: -1; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-desc { margin: 0 auto 2rem; }
  .avatar-container { width: 260px; height: 260px; }
  .ring-1 { width: 230px; height: 230px; }
  .ring-2 { width: 180px; height: 180px; }
  .ring-3 { width: 130px; height: 130px; }
  .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; background: rgba(10,10,15,0.98); padding: 1rem 0; border-bottom: 1px solid var(--glass-border); }
  .nav-links.open { display: flex; }
  .nav-link { padding: 1rem 2rem; }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .about-story { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-content { justify-content: center; text-align: center; }
  .cursor, .cursor-follower { display: none; }
  body { cursor: auto; }
}