/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #070b14;
  --bg-2: #0d1423;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(99,102,241,0.4);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
  --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  --shadow-card: 0 4px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== TYPOGRAPHY ===== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-dark { background: var(--bg-2); }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.3);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.section-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem; font-weight: 600;
  color: var(--text); text-decoration: none;
  transition: var(--transition);
}
.nav-logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }
.nav-links {
  display: flex; list-style: none; gap: 36px; align-items: center;
}
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.95rem;
  font-weight: 500; transition: var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gradient); border-radius: 1px;
  transform: scaleX(0); transition: var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 600 !important;
}
.nav-cta::after { background: var(--gradient) !important; }
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 1px; transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99;
  background: rgba(7,11,20,0.97); backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { margin: 20px 0; }
.mobile-link {
  font-size: 2rem; font-weight: 700; color: var(--text);
  text-decoration: none; transition: var(--transition);
}
.mobile-link:hover { color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; transition: var(--transition);
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 24px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-card);
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-2px);
}
.btn-large { padding: 18px 36px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 80px;
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

#particleCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.5;
}

.hero-content { position: relative; z-index: 1; }
.hero-visual { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 100px; margin-bottom: 28px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.8rem); font-weight: 900;
  line-height: 1.1; margin-bottom: 24px; color: var(--text);
}
.typed-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  min-height: 1.15em;
}
.cursor {
  display: inline-block; color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-subtitle {
  font-size: 1.15rem; color: var(--text-muted); margin-bottom: 40px;
  max-width: 480px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats { display: flex; align-items: center; gap: 28px; }
.stat { text-align: center; }
.stat-number {
  display: block; font-size: 2rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Code Card */
.code-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  width: 100%; max-width: 460px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
.code-header {
  background: var(--bg-2); padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c840; }
.code-filename { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-dim); margin-left: auto; }
.code-body { padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 1.7; overflow-x: auto; }
.c-keyword { color: #c792ea; }
.c-var { color: #82aaff; }
.c-prop { color: #f07178; }
.c-string { color: #c3e88d; }
.c-fn { color: #82aaff; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 0.75rem; z-index: 1;
  grid-column: 1 / -1;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}
.scroll-mouse {
  width: 24px; height: 38px; border: 2px solid var(--text-dim);
  border-radius: 12px; position: relative; display: flex; justify-content: center;
}
.scroll-wheel {
  width: 4px; height: 8px; background: var(--accent);
  border-radius: 2px; margin-top: 6px;
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: center; }

.about-image-wrap { position: relative; display: flex; justify-content: center; padding: 60px; }
.about-avatar {
  width: 160px; height: 160px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.avatar-initials { font-size: 3rem; font-weight: 800; color: white; }
.avatar-ring {
  position: absolute; inset: -12px; border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.3);
  animation: spin-slow 12s linear infinite;
}
.ring-2 { inset: -28px; border-color: rgba(139,92,246,0.2); animation-duration: 20s; animation-direction: reverse; }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.floating-badge {
  position: absolute; background: var(--bg-card); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 12px; font-size: 0.82rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px; color: var(--text);
  box-shadow: var(--shadow-card);
  animation: float-badge 3s ease-in-out infinite;
}
.badge-1 { top: 10px; right: 0; animation-delay: 0s; }
.badge-2 { bottom: 20px; right: 0; animation-delay: 1s; }
.badge-3 { bottom: 0; left: 0; animation-delay: 0.5s; }
@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.about-text { color: var(--text-muted); margin-bottom: 20px; font-size: 1.05rem; }
.about-text strong { color: var(--text); }

.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.skill-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: var(--transition);
}
.skill-item:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.skill-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  flex-shrink: 0;
}
.skill-name { font-weight: 600; font-size: 0.9rem; }
.skill-desc { font-size: 0.78rem; color: var(--text-dim); }

/* ===== SERVICES ===== */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  transition: var(--transition);
  animation-delay: var(--delay, 0s);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient-subtle); opacity: 0;
  transition: var(--transition);
}
.service-card:hover { border-color: var(--border-glow); transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 20px; position: relative; z-index: 1;
  transition: var(--transition);
}
.service-card:hover .service-icon { background: var(--gradient); color: white; border-color: transparent; }
.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; position: relative; z-index: 1; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; margin-bottom: 20px; position: relative; z-index: 1; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.service-tags span {
  font-size: 0.72rem; font-weight: 600; padding: 4px 10px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px; color: var(--accent);
}

/* ===== PROJECTS / COMING SOON ===== */
.coming-soon-container { display: flex; justify-content: center; }
.coming-soon-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 24px; padding: 64px 48px; max-width: 640px; width: 100%;
  text-align: center; box-shadow: var(--shadow-card);
}
.cs-animation { position: relative; height: 120px; margin-bottom: 32px; display: flex; align-items: center; justify-content: center; }
.cs-orbit {
  width: 110px; height: 110px; border-radius: 50%;
  border: 2px dashed rgba(99,102,241,0.3);
  position: relative; animation: spin-slow 8s linear infinite;
}
.cs-planet {
  position: absolute; border-radius: 50%;
  background: var(--gradient);
}
.planet-1 { width: 12px; height: 12px; top: -6px; left: 50%; transform: translateX(-50%); }
.planet-2 { width: 8px; height: 8px; bottom: 10px; right: -4px; }
.planet-3 { width: 10px; height: 10px; top: 50%; left: -5px; transform: translateY(-50%); }
.cs-rocket { font-size: 3rem; position: absolute; animation: rocket-float 3s ease-in-out infinite; }
@keyframes rocket-float {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-10px) rotate(10deg); }
}
.coming-soon-card h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 16px; }
.coming-soon-card p { color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; }

.cs-progress { margin-bottom: 28px; }
.cs-progress-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.cs-progress-bar { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.cs-progress-fill {
  height: 100%; background: var(--gradient); border-radius: 3px;
  width: 35%; animation: progress-anim 3s ease-in-out infinite alternate;
}
@keyframes progress-anim { from { width: 25%; } to { width: 55%; } }

.cs-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cs-tag {
  font-size: 0.82rem; font-weight: 600; padding: 8px 18px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  border-radius: 100px; color: var(--text-muted);
}

/* ===== CTA ===== */
.section-cta { padding: 40px 0; }
.cta-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 24px; padding: 80px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 300px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; margin: 12px 0 16px; }
.cta-card p { color: var(--text-muted); margin-bottom: 36px; font-size: 1.05rem; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: start; }
.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 16px; transition: var(--transition);
}
.contact-item:hover { border-color: var(--border-glow); }
.contact-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}
.contact-label { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { color: var(--text); font-weight: 500; text-decoration: none; }
a.contact-value:hover { color: var(--accent); }
.availability-dot {
  display: inline-block; width: 8px; height: 8px;
  background: #22c55e; border-radius: 50%; margin-right: 6px;
  animation: pulse-dot 2s infinite;
}

.social-links { display: flex; gap: 12px; margin-top: 24px; }
.social-btn {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none; transition: var(--transition);
}
.social-btn:hover { background: var(--bg-card-hover); border-color: var(--border-glow); color: var(--accent); transform: translateY(-3px); }

/* Form */
.contact-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; gap: 20px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group textarea {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  color: var(--text); font-family: inherit; font-size: 0.95rem;
  transition: var(--transition); outline: none; resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-glow);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-content {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .nav-logo { font-size: 1rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 28px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--text-dim);
}
.heart { color: #f43f5e; }

/* ===== ANIMATIONS ===== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal-up.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1; transform: translate(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
  }
  .hero-content { order: 1; }
  .hero-visual { order: 2; }
  .hero-subtitle { margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .scroll-indicator { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 20px; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .code-card { max-width: 100%; }
  .coming-soon-card { padding: 40px 24px; }
  .cta-card { padding: 48px 24px; }
  .contact-form { padding: 24px; }
}
