/* ===== Reset & Variables ===== */
:root {
  --bg: #0a0e1a;
  --bg-alt: #0e1424;
  --surface: #131b2e;
  --surface-2: #182238;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf5;
  --muted: #9aa6bf;
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --cyan: #22d3ee;
  --gradient: linear-gradient(120deg, #818cf8 0%, #a78bfa 45%, #22d3ee 100%);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max-width: 1140px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .logo-text { font-family: 'Space Grotesk', 'Inter', sans-serif; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--primary); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ===== Header / Nav ===== */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  transition: background 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; }
.logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--gradient); color: #fff;
  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.5px;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links .nav-cta {
  padding: 9px 20px; border-radius: 30px; color: #fff; font-weight: 600;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-links .nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4); color: #fff; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 25px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 130px 0 90px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; pointer-events: none; }
.glow-one { width: 480px; height: 480px; background: #4f46e5; top: -80px; left: -120px; }
.glow-two { width: 420px; height: 420px; background: #0891b2; bottom: -100px; right: -80px; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 0.82rem; font-weight: 600; color: var(--cyan); margin-bottom: 20px; letter-spacing: 0.4px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -1.5px; }
.hero-subtitle { font-size: clamp(1.2rem, 2.4vw, 1.65rem); font-weight: 600; color: var(--text); margin: 10px 0 20px; }
.slash { color: var(--primary); }
.hero-description { max-width: 620px; color: var(--muted); font-size: 1.02rem; }
.hero-actions { display: flex; gap: 14px; margin: 32px 0; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 30px; font-weight: 600; font-size: 0.95rem; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.btn-primary { background: linear-gradient(120deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 10px 30px rgba(99, 102, 241, 0.28); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(99, 102, 241, 0.45); }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-outline:hover { border-color: var(--primary); transform: translateY(-3px); }
.hero-socials { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-socials a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; transition: 0.25s; }
.hero-socials a:hover { border-color: var(--primary); background: rgba(99,102,241,0.1); transform: translateY(-3px); }
.hero-socials svg { width: 18px; height: 18px; fill: var(--muted); }
.hero-socials a:hover svg { fill: var(--text); }
.location-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; margin-left: 6px; }
.location-inline svg { width: 15px; height: 15px; fill: var(--cyan); }

/* Hero visual */
.hero-visual { display: flex; justify-content: center; }
.avatar-card { position: relative; padding: 30px; }
.avatar-ring {
  width: 300px; height: 300px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 0deg, var(--primary), var(--cyan), var(--secondary), var(--primary));
  padding: 6px; position: relative;
  box-shadow: 0 0 80px rgba(99,102,241,0.35);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.avatar-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  display: block; background-color: var(--bg);
}
.float-badge {
  position: absolute; display: flex; align-items: center; gap: 9px;
  background: rgba(19, 27, 46, 0.9); backdrop-filter: blur(10px);
  border: 1px solid var(--border); padding: 11px 16px; border-radius: 14px;
  font-size: 0.82rem; font-weight: 600; box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.badge-top { top: 10px; right: -10px; }
.badge-bottom { bottom: 20px; left: -15px; animation-delay: 1.5s; }
.badge-icon { color: var(--cyan); font-size: 1rem; }
.scroll-indicator {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 2px solid var(--border); border-radius: 14px; z-index: 2;
}
.scroll-indicator span { display: block; width: 4px; height: 8px; background: var(--primary); border-radius: 2px; margin: 7px auto 0; animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-sm { padding: 40px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-heading { margin-bottom: 50px; }
.section-heading.center { text-align: center; }
.section-label { display: inline-block; color: var(--primary); font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px; }
.section-heading h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); font-weight: 700; letter-spacing: -1px; }
.section-intro { color: var(--muted); max-width: 620px; margin: 14px auto 0; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-number { font-family: 'Space Grotesk', sans-serif; font-size: 2.6rem; font-weight: 700; color: #fff; }
.stat-suffix { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* About */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 70px; align-items: start; }
.about-body p { color: var(--muted); margin-bottom: 16px; }
.about-body .lead { color: var(--text); font-size: 1.15rem; font-weight: 500; }
.info-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip { background: var(--surface); border: 1px solid var(--border); padding: 8px 15px; border-radius: 30px; font-size: 0.83rem; color: var(--muted); }
.chip::first-letter { color: var(--cyan); }

/* Timeline */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding-left: 50px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--primary), var(--secondary), transparent); }
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker { position: absolute; left: -43px; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-alt); border: 3px solid var(--primary); box-shadow: 0 0 0 5px rgba(99,102,241,0.12); z-index: 1; }
.timeline-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 30px; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.timeline-card:hover { transform: translateX(6px); border-color: rgba(99,102,241,0.4); box-shadow: var(--shadow); }
.timeline-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.timeline-top h3 { font-size: 1.25rem; font-weight: 700; }
.company { color: var(--cyan); font-weight: 600; font-size: 0.95rem; margin-top: 3px; }
.company-location { color: var(--muted); font-weight: 400; }
.date { font-size: 0.8rem; color: var(--muted); background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2); padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.timeline-card ul li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.timeline-card ul li::before { content: '▸'; position: absolute; left: 0; color: var(--primary); }
.timeline-card ul li strong { color: var(--text); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill-category { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: transform 0.3s, border-color 0.3s; }
.skill-category:hover { transform: translateY(-5px); border-color: rgba(34,211,238,0.35); }
.skill-category h3 { font-size: 1.1rem; margin-bottom: 18px; font-weight: 600; }
.cat-icon { color: var(--cyan); margin-right: 8px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag { background: var(--surface-2); border: 1px solid var(--border); padding: 8px 14px; border-radius: 10px; font-size: 0.86rem; color: var(--muted); transition: 0.2s; }
.skill-tag:hover { border-color: var(--primary); color: var(--text); transform: translateY(-2px); }
.skill-tag.featured { background: linear-gradient(120deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15)); border-color: rgba(99,102,241,0.4); color: #c7d2fe; }
.skill-tag em { font-style: normal; color: var(--muted); font-size: 0.75rem; }
.languages { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.lang-label { color: var(--muted); font-size: 0.9rem; }
.lang { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 6px 16px; font-size: 0.85rem; }

/* Education */
.education-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 820px; margin: 0 auto; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; transition: transform 0.3s, border-color 0.3s; }
.edu-card:hover { transform: translateY(-6px); border-color: rgba(99,102,241,0.4); }
.edu-icon { font-size: 2rem; margin-bottom: 12px; }
.edu-date { color: var(--cyan); font-size: 0.82rem; font-weight: 600; }
.edu-card h3 { font-size: 1.15rem; margin: 8px 0 6px; }
.edu-card p { color: var(--muted); font-size: 0.9rem; }

/* Contact */
.contact-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(34,211,238,0.06));
  border: 1px solid rgba(99,102,241,0.25); border-radius: 26px; padding: 50px;
  position: relative; overflow: hidden;
}
.contact-card::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(99,102,241,0.15); filter: blur(70px); top: -100px; right: -80px; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 14px; }
.contact-copy p { color: var(--muted); max-width: 480px; }
.contact-methods { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.contact-item { display: flex; align-items: center; gap: 16px; background: rgba(10,14,26,0.5); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; transition: 0.25s; }
a.contact-item:hover { border-color: var(--primary); transform: translateX(5px); }
.contact-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(99,102,241,0.15); font-size: 1.2rem; flex-shrink: 0; }
.contact-item small { display: block; color: var(--muted); font-size: 0.75rem; }
.contact-item strong { font-size: 0.92rem; font-weight: 600; word-break: break-word; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: 0.85rem; }
.footer-tag .accent { color: #f472b6; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-description { margin: 0 auto; }
  .hero-actions, .hero-socials { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .contact-card { grid-template-columns: 1fr; padding: 36px; gap: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 76px; left: 0; width: 100%;
    background: rgba(10,14,26,0.98); backdrop-filter: blur(16px);
    flex-direction: column; gap: 0; padding: 10px 24px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%); transition: transform 0.35s ease; z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav-links .nav-cta { text-align: center; margin-top: 14px; border: 0; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 70px 0; }
  .avatar-ring { width: 240px; height: 240px; }
  .badge-top { right: -25px; }
  .badge-bottom { left: -25px; }
  .skills-grid, .education-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 36px; }
  .timeline::before { left: 8px; }
  .timeline-marker { left: -36px; }
  .float-badge { font-size: 0.7rem; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
