/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a1a;
  --bg-card: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.1);
  --text: #ffffff;
  --muted: #9ca3af;
  --muted2: #6b7280;
  --purple: #a78bfa;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --green: #4ade80;
  --orange: #fb923c;
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --max: 72rem;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Selection */
::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #fff;
}

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

/* Utilities */
.hidden { display: none !important; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.gradient-text {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-muted { color: var(--muted); margin-bottom: 1rem; }

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.navbar.scrolled {
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(88, 28, 135, 0.12);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-desktop { display: none; gap: 2rem; }
.nav-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.25s;
  font-family: inherit;
  padding: 0.25rem 0;
}
.nav-link:hover,
.nav-link.active { color: var(--purple); }
.menu-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}
.menu-btn:hover { color: #fff; }
.mobile-nav {
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
  .mobile-nav { display: none !important; }
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}
.blob-1 {
  top: 25%; left: 25%;
  width: 24rem; height: 24rem;
  background: #9333ea;
  animation: pulse 4s ease-in-out infinite;
}
.blob-2 {
  bottom: 25%; right: 25%;
  width: 24rem; height: 24rem;
  background: #2563eb;
  animation: pulse 4s ease-in-out infinite 1s;
}
.blob-3 {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38rem; height: 38rem;
  background: #4f46e5;
  opacity: 0.1;
}
.grid-pattern {
  position: absolute; inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}
@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.3; }
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 56rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 0.5rem; height: 0.5rem;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.name-white {
  background: linear-gradient(90deg, #fff, #e5e7eb, #9ca3af);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.name-gradient {
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(90deg, #9333ea, #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(90deg, #a855f7, #3b82f6);
  box-shadow: 0 10px 28px rgba(147, 51, 234, 0.4);
}
.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: #fff;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 28rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.stat-value.purple { background-image: linear-gradient(90deg, var(--purple), var(--blue)); }
.stat-value.blue { background-image: linear-gradient(90deg, var(--blue), var(--cyan)); }
.stat-value.cyan { background-image: linear-gradient(90deg, var(--cyan), var(--green)); }
.stat-label { font-size: 0.875rem; color: var(--muted2); margin-top: 0.25rem; }
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted2);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Sections */
.section { padding: 6rem 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(88, 28, 135, 0.04), transparent);
}
.section-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.section-header { text-align: center; margin-bottom: 3rem; }

/* About */
.about-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.about-cards::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(147,51,234,0.15), rgba(37,99,235,0.15));
  border-radius: var(--radius-lg);
  filter: blur(24px);
  z-index: -1;
}
.about-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 0.75rem;
  padding: 1rem;
}
.card-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.card-title { font-size: 0.875rem; font-weight: 500; }
.card-desc { font-size: 0.75rem; color: var(--muted2); margin-top: 0.25rem; }

/* Projects */
.projects-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
.project-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.4s, transform 0.3s;
  position: relative;
}
.project-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  transform: translateY(-2px);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.project-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.project-icon.purple { background: linear-gradient(135deg, #a855f7, #3b82f6); }
.project-icon.blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.project-icon.cyan { background: linear-gradient(135deg, #06b6d4, #22c55e); }
.project-icon.orange { background: linear-gradient(135deg, #f97316, #ef4444); }
.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid;
}
.tag.purple { background: rgba(168,85,247,0.1); color: var(--purple); border-color: rgba(168,85,247,0.25); }
.tag.blue { background: rgba(59,130,246,0.1); color: var(--blue); border-color: rgba(59,130,246,0.25); }
.tag.cyan { background: rgba(6,182,212,0.1); color: var(--cyan); border-color: rgba(6,182,212,0.25); }
.tag.orange { background: rgba(249,115,22,0.1); color: var(--orange); border-color: rgba(249,115,22,0.25); }
.project-card h4 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.project-card p { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.05);
}
.project-footer {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}
.status { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); }
.company.purple { color: var(--purple); }
.company.blue { color: var(--blue); }
.company.cyan { color: var(--cyan); }
.company.orange { color: var(--orange); }

/* Achievements */
.achievements-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) {
  .achievements-grid { grid-template-columns: repeat(3, 1fr); }
}
.achievement-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.achievement-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.3);
}
.ach-value {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.ach-value.purple { background-image: linear-gradient(90deg, var(--purple), var(--blue)); }
.ach-value.blue { background-image: linear-gradient(90deg, var(--blue), var(--cyan)); }
.ach-value.cyan { background-image: linear-gradient(90deg, var(--cyan), var(--green)); }
.ach-title { font-size: 1.125rem; font-weight: 500; margin-bottom: 0.5rem; }
.achievement-card p { font-size: 0.875rem; color: var(--muted2); }

/* Timeline */
.timeline {
  position: relative;
  margin-top: 2rem;
}
.timeline-line {
  display: none;
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(168,85,247,0.5), rgba(59,130,246,0.5), transparent);
}
@media (min-width: 768px) {
  .timeline-line { display: block; }
}
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .timeline-item { flex-direction: row; }
  .timeline-item.left .timeline-card { text-align: right; margin-right: 3rem; }
  .timeline-item.right .timeline-card { text-align: left; margin-left: 3rem; }
  .timeline-item .timeline-card { width: calc(50% - 2rem); }
  .timeline-item.left { justify-content: flex-end; }
  .timeline-item.right { justify-content: flex-start; }
}
.timeline-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%;
}
.timeline-label { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.timeline-label.purple { color: var(--purple); }
.timeline-label.blue { color: var(--blue); }
.timeline-label.cyan { color: var(--cyan); }
.timeline-card h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.timeline-card p { font-size: 0.875rem; color: var(--muted); }
.timeline-dot {
  width: 1rem; height: 1rem;
  border-radius: 50%;
  border: 4px solid var(--bg);
  flex-shrink: 0;
  z-index: 1;
  display: none;
}
@media (min-width: 768px) {
  .timeline-dot { display: block; }
}
.timeline-dot.purple { background: #a855f7; }
.timeline-dot.blue { background: #3b82f6; }
.timeline-dot.cyan { background: #06b6d4; }

/* Skills */
.skills-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
.skill-block {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.skill-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.skill-icon.purple { background: linear-gradient(135deg, #a855f7, #3b82f6); }
.skill-icon.blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.skill-icon.cyan { background: linear-gradient(135deg, #06b6d4, #22c55e); }
.skill-icon.orange { background: linear-gradient(135deg, #f97316, #ef4444); }
.skill-row { margin-bottom: 1rem; }
.skill-row:last-child { margin-bottom: 0; }
.skill-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
.skill-meta span:first-child { color: #d1d5db; }
.skill-meta span:last-child { color: var(--muted2); }
.skill-bar {
  height: 0.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 9999px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0;
  transition: width 1s ease-out;
}
.skill-fill.purple { background: linear-gradient(90deg, #a855f7, #3b82f6); }
.skill-fill.blue { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.skill-fill.cyan { background: linear-gradient(90deg, #06b6d4, #22c55e); }
.skill-fill.orange { background: linear-gradient(90deg, #f97316, #ef4444); }

.tools-block {
  margin-top: 3rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.tools-block h4 { margin-bottom: 1.5rem; font-size: 1.125rem; }
.tools-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.tools-list span {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  color: #d1d5db;
  border: 1px solid var(--border);
  transition: border-color 0.25s, color 0.25s;
}
.tools-list span:hover {
  border-color: rgba(168, 85, 247, 0.35);
  color: #c4b5fd;
}

/* Contact */
.contact-container { text-align: center; max-width: 56rem; }
.contact-lead { max-width: 28rem; margin: 0 auto 3rem; }
.contact-cards {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .contact-cards { grid-template-columns: repeat(3, 1fr); }
}
.contact-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.3s;
}
.contact-card:hover { border-color: rgba(168, 85, 247, 0.3); }
.contact-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.contact-label { font-size: 0.875rem; color: var(--muted); }
.contact-value {
  display: inline-block;
  margin-top: 0.25rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: color 0.25s;
}
a.contact-value:hover { color: var(--purple); }

/* Footer */
.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-copy, .footer-role { font-size: 0.875rem; color: var(--muted2); }

/* Focus styles for a11y */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
