@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

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

:root {
  --bg: #0A0A0A;
  --bg-card: #141414;
  --bg-card-hover: #1A1A1A;
  --accent: #10B981;
  --accent-bright: #00FF00;
  --accent-glow: rgba(16, 185, 129, 0.4);
  --accent-glow-bright: rgba(0, 255, 0, 0.3);
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(16, 185, 129, 0.12);
  --border-hover: rgba(16, 185, 129, 0.5);
}

html { scroll-behavior: smooth; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1A1A1A; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════ ANIMATED BACKGROUND ═══════════ */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(16,185,129,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,185,129,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-shift 20s linear infinite;
}
@keyframes grid-shift {
  from { transform: translate(0, 0); }
  to { transform: translate(60px, 60px); }
}
.bg-glow {
  position: fixed; z-index: -1;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.4;
}
.bg-glow-1 {
  top: -100px; right: -100px;
  background: rgba(16,185,129,0.08);
  animation: glow-drift-1 12s ease-in-out infinite;
}
.bg-glow-2 {
  bottom: -150px; left: -100px;
  background: rgba(0,255,0,0.05);
  animation: glow-drift-2 15s ease-in-out infinite;
}
@keyframes glow-drift-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-80px, 60px); }
}
@keyframes glow-drift-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, -80px); }
}

/* ═══════════ NAVIGATION ═══════════ */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}
.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem; font-weight: 700;
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: 6px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none; transition: color 0.3s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--accent-bright); }

.menu-toggle {
  display: none; background: none; border: none;
  color: var(--accent); font-size: 1.4rem; cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; width: 100%;
    background: rgba(10,10,10,0.97); backdrop-filter: blur(20px);
    padding: 24px; gap: 18px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
}

/* ═══════════ SCROLL PROGRESS ═══════════ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  width: 0%; transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ═══════════ REUSABLE ═══════════ */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: inline-block;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; color: #fff;
  margin-bottom: 12px; line-height: 1.15;
}
.section-subtitle {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 48px;
}
.text-center { text-align: center; }

section {
  padding: 100px 24px;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
.section-full {
  max-width: 100%;
}
.section-inner { max-width: 1100px; margin: 0 auto; }

/* ═══════════ HERO ═══════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(16,185,129,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(0,255,0,0.03) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; }

/* Hero Photo - Animated rotating border */
.hero-photo-wrapper {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto 36px;
  animation: float-photo 3s ease-in-out infinite;
}
.hero-photo-wrapper:hover {
  animation-play-state: paused;
  transform: scale(1.08);
}
@keyframes float-photo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero-photo-border {
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent-bright),
    var(--accent),
    transparent,
    transparent,
    var(--accent),
    var(--accent-bright)
  );
  animation: rotate-border 4s linear infinite;
  z-index: 0;
}
.hero-photo-border::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 40px var(--accent-glow-bright), 0 0 80px rgba(0,255,0,0.1);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes rotate-border {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero-photo {
  position: relative;
  width: 200px; height: 200px;
  border-radius: 50%; overflow: hidden;
  z-index: 1;
  border: 3px solid var(--bg);
  transition: all 0.5s ease;
}
.hero-photo:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}
.hero-photo:hover img {
  filter: brightness(1.15) saturate(1.1);
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 900; color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.hero-title {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  color: var(--accent);
  margin-bottom: 28px;
  font-weight: 500;
}
.hero-tagline {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 550px; margin: 0 auto 40px;
  min-height: 1.7em;
}
.typewriter {
  border-right: 2px solid var(--accent-bright);
  padding-right: 4px;
  animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
  0%, 100% { border-color: var(--accent-bright); }
  50% { border-color: transparent; }
}

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  font-weight: 600; font-size: 0.9rem;
  padding: 14px 32px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.3s ease; border: none;
}
.btn-primary {
  background: var(--accent);
  color: #000; font-weight: 700;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 36px var(--accent-glow-bright);
}
.btn-outline {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--border-hover);
}
.btn-outline:hover {
  background: rgba(16,185,129,0.08);
  border-color: var(--accent-bright);
  transform: translateY(-3px);
}

/* ═══════════ ABOUT ═══════════ */
.about-block {
  max-width: 750px; margin: 0 auto;
  text-align: center;
  position: relative;
  padding: 40px 32px;
}
.about-block::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 2px;
}
.about-block p {
  font-size: 1.15rem; line-height: 1.9;
  color: var(--text-secondary);
}
.about-block strong {
  color: var(--accent); font-weight: 600;
}

/* ═══════════ EDUCATION ═══════════ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 750px;
  margin: 0 auto;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 32px 36px;
  transition: all 0.4s ease;
}
.edu-card:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.edu-icon {
  font-size: 1.5rem; color: var(--accent);
  margin-bottom: 12px;
}
.edu-degree {
  font-size: 1.25rem; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.edu-school {
  font-size: 0.95rem; color: var(--text-secondary);
}
.edu-school .highlight {
  color: var(--accent); font-weight: 600;
}

/* ═══════════ SKILLS ═══════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.4s ease;
}
.skill-group:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.skill-group-title {
  font-size: 1rem; font-weight: 700; color: #fff;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.skill-group-title i { color: var(--accent); font-size: 1.2rem; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; font-weight: 500;
  padding: 8px 18px;
  background: rgba(16,185,129,0.06);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--accent);
  transition: all 0.3s ease;
  cursor: default;
}
.skill-pill:hover {
  background: rgba(0,255,0,0.12);
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  box-shadow: 0 0 16px rgba(0,255,0,0.15);
  transform: scale(1.05);
}

/* ═══════════ SERVICES ═══════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.service-card {
  background: #1A1A1A;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 40px 28px;
  text-align: center;
  transition: all 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(16,185,129,0.15), 0 0 0 1px var(--accent);
}
.service-icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,0.08);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 1.5rem;
  color: var(--accent);
  transition: all 0.3s;
}
.service-card:hover .service-icon {
  background: rgba(0,255,0,0.12);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0,255,0,0.1);
}
.service-name {
  font-size: 1.1rem; font-weight: 700; color: #fff;
  margin-bottom: 10px;
}
.service-desc {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7;
}

/* ═══════════ PROJECTS ═══════════ */
.project-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s ease;
}
.project-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

/* Side-by-side layout */
.project-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
}

/* Image Carousel (inside side layout) */
.project-images {
  background: #080808;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.project-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
}
.project-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.carousel-btn {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  background: rgba(10,10,10,0.7);
  border: 1px solid var(--border);
  color: var(--accent); font-size: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.carousel-btn:hover {
  background: rgba(16,185,129,0.15);
  border-color: var(--accent);
}
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
  position: absolute; bottom: 12px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 5;
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none; cursor: pointer;
  transition: all 0.3s;
}
.carousel-dot.active {
  background: var(--accent-bright);
  box-shadow: 0 0 8px var(--accent-glow-bright);
  width: 20px; border-radius: 4px;
}

@media (max-width: 768px) {
  .project-layout {
    grid-template-columns: 1fr;
  }
  .project-images {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .project-carousel {
    min-height: 280px;
  }
}

.project-body { padding: 40px; }
.project-status-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  padding: 4px 14px; border-radius: 20px;
  background: rgba(16,185,129,0.12); color: var(--accent);
  border: 1px solid var(--border); display: inline-block;
  margin-bottom: 14px;
}
.project-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800; color: #fff;
  margin-bottom: 16px;
}

.project-subtitle a {
  color: var(--accent);
  text-decoration: none;
}

.project-subtitle a:hover {
  color: var(--accent-bright);
}

/* Stats Grid */
.project-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.project-desc {
  color: var(--text-secondary); line-height: 1.85;
  margin-bottom: 24px; font-size: 0.95rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  padding: 5px 14px; background: rgba(16,185,129,0.06);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-muted); transition: all 0.3s;
}
.project-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════ ACHIEVEMENTS ═══════════ */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.achieve-card {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 18px;
  padding: 36px;
  display: flex; align-items: center; gap: 20px;
  position: relative;
  box-shadow: 0 0 30px rgba(16,185,129,0.1);
  transition: all 0.4s ease;
}
.achieve-card:hover {
  box-shadow: 0 0 50px rgba(0,255,0,0.15), 0 20px 50px rgba(0,0,0,0.3);
  transform: translateY(-4px);
}
.achieve-icon-wrap {
  flex-shrink: 0;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,0.1);
  border: 1px solid var(--accent);
  border-radius: 16px;
  font-size: 1.8rem;
  color: #FFD700;
  animation: trophy-glow 3s ease-in-out infinite;
}
@keyframes trophy-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.1); }
  50% { box-shadow: 0 0 25px rgba(255,215,0,0.25); }
}
.achieve-title {
  font-size: 1.3rem; font-weight: 700; color: #fff;
  margin-bottom: 6px;
}
.achieve-desc {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7;
}

/* ═══════════ CONTACT / FOOTER ═══════════ */
.contact-section {
  text-align: center;
  position: relative;
  border-top: 1px solid var(--border);
}
.contact-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,0.06), transparent 70%);
  pointer-events: none;
}
.contact-items {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 16px; margin-top: 40px;
}
.contact-link {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px;
  color: #fff; text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: all 0.4s ease;
}
.contact-link:hover {
  border-color: var(--accent);
  background: rgba(16,185,129,0.06);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.contact-link i { color: var(--accent); font-size: 1.2rem; }

.footer {
  text-align: center; padding: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted);
}

/* ═══════════ SCROLL REVEAL ANIMATIONS ═══════════ */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0; transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* stagger */
.stagger > *:nth-child(1) { transition-delay: 0.1s; }
.stagger > *:nth-child(2) { transition-delay: 0.2s; }
.stagger > *:nth-child(3) { transition-delay: 0.3s; }
.stagger > *:nth-child(4) { transition-delay: 0.4s; }

/* ═══════════ PARTICLES ═══════════ */
.particle {
  position: absolute; width: 2px; height: 2px;
  background: var(--accent-bright); border-radius: 50%;
  opacity: 0; animation: float-particle 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes float-particle {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  50% { opacity: 0.5; transform: translateY(-70px) scale(1); }
  100% { opacity: 0; transform: translateY(-140px) scale(0); }
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 640px) {
  section { padding: 70px 18px; }
  .about-block { padding: 30px 16px; }
  .achieve-card { flex-direction: column; text-align: center; padding: 32px 24px; }
  .project-body { padding: 28px 20px; }
  .contact-link { padding: 14px 20px; font-size: 0.82rem; }
  .project-stats { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
}
