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

:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --card: #16161f;
  --border: #1e1e2e;
  --cyan: #00f0ff;
  --purple: #a855f7;
  --pink: #ec4899;
  --green: #22d3ee;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --gradient: linear-gradient(135deg, var(--cyan), var(--purple));
}

html { scroll-behavior: smooth; }

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

::selection { background: var(--cyan); color: var(--bg); }

/* ===== ANIMATED BACKGROUND GRID ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Floating particles */
.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--cyan);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.navbar.scrolled {
  padding: 0.6rem 2rem;
  background: rgba(10, 10, 15, 0.95);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo span { font-weight: 400; opacity: 0.7; }

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--cyan); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* ===== SECTIONS COMMON ===== */
section { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.05);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
}

.section-title .gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 5rem;
  position: relative;
}

.hero-content { max-width: 800px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  background: var(--card);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero h1 .line { display: block; }

.hero h1 .gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 550px;
  margin: 0 auto 2.5rem;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }

.stat-number {
  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.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ===== TYPING EFFECT ===== */
.typed-text {
  color: var(--cyan);
  position: relative;
}

.typed-text::after {
  content: '|';
  animation: blink 0.7s step-end infinite;
  color: var(--cyan);
}

@keyframes blink {
  50% { opacity: 0; }
}

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

.about-image {
  position: relative;
}

.about-image-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--gradient);
  border-radius: 24px;
  z-index: 0;
  opacity: 0.7;
}

.about-img-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  overflow: hidden;
}

.about-code-float {
  position: absolute;
  padding: 0.75rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  white-space: nowrap;
  z-index: 2;
  animation: code-float 6s ease-in-out infinite;
}

.about-code-float.top { top: -20px; right: -30px; }
.about-code-float.bottom { bottom: -20px; left: -30px; animation-delay: -3s; }

@keyframes code-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.detail-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 240, 255, 0.1);
  border-radius: 8px;
  font-size: 1rem;
}

.detail-label { font-size: 0.75rem; color: var(--muted); }
.detail-value { font-size: 0.9rem; font-weight: 600; }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.skill-card:hover::before { transform: scaleX(1); }

.skill-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.skill-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.skill-icon.frontend { background: rgba(0, 240, 255, 0.1); }
.skill-icon.backend { background: rgba(168, 85, 247, 0.1); }
.skill-icon.tools { background: rgba(236, 72, 153, 0.1); }
.skill-icon.design { background: rgba(34, 211, 238, 0.1); }

.skill-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.skill-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skill-tag {
  padding: 0.3rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  transition: all 0.3s;
}

.skill-card:hover .skill-tag {
  border-color: rgba(0, 240, 255, 0.2);
  color: var(--cyan);
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s;
}

.project-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.project-preview.p1 { background: linear-gradient(135deg, #0f172a, #1e293b); }
.project-preview.p2 { background: linear-gradient(135deg, #1a0a2e, #2d1b4e); }
.project-preview.p3 { background: linear-gradient(135deg, #0a1628, #162033); }

.project-preview-code {
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  opacity: 0.4;
  position: absolute;
  padding: 1rem;
  top: 0;
  left: 0;
  line-height: 1.4;
}

.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;
}

.project-card:hover .project-overlay { opacity: 1; }

.project-overlay a {
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.project-overlay .live-btn {
  background: var(--cyan);
  color: var(--bg);
}

.project-overlay .code-btn {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.project-info { padding: 1.5rem; }

.project-info h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.project-info p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tech-tag {
  padding: 0.25rem 0.6rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--cyan);
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-content {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.timeline-content:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

.timeline-content h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }

.timeline-content .company {
  color: var(--purple);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-content p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== CONTACT ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-links { display: flex; flex-direction: column; gap: 1rem; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
}

.contact-link:hover {
  border-color: var(--cyan);
  transform: translateX(5px);
}

.contact-link-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 240, 255, 0.1);
  border-radius: 10px;
  font-size: 1.2rem;
}

.contact-link-label { font-size: 0.8rem; color: var(--muted); }
.contact-link-value { font-weight: 600; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { position: relative; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

.btn-submit {
  align-self: flex-start;
  background: var(--gradient);
  color: var(--bg);
  font-weight: 700;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.3);
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p { color: var(--muted); font-size: 0.9rem; }

.footer-socials { display: flex; gap: 1rem; }

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.social-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GLOW ORB ===== */
.glow-orb {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08), transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.3s ease-out, top 0.3s ease-out;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  z-index: 1001;
  transition: width 0.1s;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--cyan);
  color: var(--bg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg2);
    flex-direction: column;
    padding: 5rem 2rem;
    transition: right 0.4s;
    border-left: 1px solid var(--border);
  }

  .nav-links.open { right: 0; }

  .hamburger { display: flex; }

  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-image { order: -1; }
  .about-details { justify-content: center; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  section { padding: 4rem 1.25rem; }
  .footer-content { flex-direction: column; }
}
