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

:root {
  --bg: #0a0e17;
  --bg-alt: #0f1522;
  --surface: rgba(18, 26, 42, 0.7);
  --border: rgba(94, 234, 212, 0.12);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-glow: rgba(94, 234, 212, 0.25);
  --purple: #a78bfa;
  --radius: 16px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== 3D Canvas ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent) !important;
  color: #0a0e17 !important;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-dim) !important; color: #0a0e17 !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
  padding: 8rem 2.5rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.25);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text);
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero-tagline span {
  color: var(--accent);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--accent);
  color: #0a0e17;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 0 32px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Floating 3D cards */
.hero-visual {
  position: relative;
  height: 420px;
  perspective: 1200px;
}

.floating-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: transform 0.4s ease;
  transform-style: preserve-3d;
}

.card-1 {
  top: 10%; left: 5%;
  width: 200px;
  animation: float1 6s ease-in-out infinite;
}
.card-2 {
  top: 35%; right: 5%;
  width: 180px;
  animation: float2 7s ease-in-out infinite;
}
.card-3 {
  bottom: 8%; left: 25%;
  width: 160px;
  animation: float3 5.5s ease-in-out infinite;
}

.card-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.card-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}
.card-chart {
  height: 40px;
  margin-top: 0.75rem;
  background: linear-gradient(90deg, transparent, rgba(94,234,212,0.3), transparent);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.card-chart::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(94,234,212,0.4) 8px,
    rgba(94,234,212,0.4) 12px
  );
}

.card-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 50px;
  margin-top: 0.5rem;
}
.card-bars span {
  flex: 1;
  background: linear-gradient(to top, var(--accent), var(--purple));
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
}
.card-bars span:nth-child(1) { height: 40%; }
.card-bars span:nth-child(2) { height: 70%; }
.card-bars span:nth-child(3) { height: 55%; }
.card-bars span:nth-child(4) { height: 90%; }
.card-bars span:nth-child(5) { height: 65%; }

.card-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
}

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotateY(-8deg) rotateX(4deg); }
  50% { transform: translateY(-18px) rotateY(-4deg) rotateX(2deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotateY(10deg) rotateX(-3deg); }
  50% { transform: translateY(-22px) rotateY(6deg) rotateX(-1deg); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0) rotateY(-5deg) rotateX(6deg); }
  50% { transform: translateY(-14px) rotateY(-2deg) rotateX(3deg); }
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2.5rem;
}
.section-alt { background: var(--bg-alt); }
.container { max-width: 1100px; margin: 0 auto; }

.section-header { margin-bottom: 3rem; }
.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--text-muted);
  max-width: 520px;
  font-size: 1.05rem;
}

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

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
}
.service-card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 20px var(--accent-glow);
}
.service-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.15rem;
  top: 0.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s;
  transform-style: preserve-3d;
}
.timeline-content:hover {
  border-color: rgba(94, 234, 212, 0.3);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.35rem 0 0.2rem;
}
.timeline-org {
  font-size: 0.9rem;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.timeline-content p:last-child {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== Skills ===== */
.skills-wrapper { display: flex; flex-direction: column; gap: 2rem; }
.skills-group h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skill-tags span {
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.18);
  color: var(--text);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.skill-tags span:hover {
  background: rgba(94, 234, 212, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.skill-tags.tools span {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.25);
}
.skill-tags.tools span:hover {
  background: rgba(167, 139, 250, 0.2);
  border-color: var(--purple);
  color: var(--purple);
}

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

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
}
.project-card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(167, 139, 250, 0.12);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.project-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.project-tagline {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.project-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.project-desc { margin-top: 0.5rem !important; }
.project-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== Education ===== */
.edu-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  max-width: 520px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s;
  transform-style: preserve-3d;
}
.edu-card:hover { border-color: rgba(94, 234, 212, 0.3); }
.edu-icon { font-size: 2.5rem; }
.edu-card h3 { font-size: 1.25rem; font-weight: 700; }
.edu-school { color: var(--accent); font-weight: 500; margin: 0.2rem 0; }
.edu-years { color: var(--text-muted); font-size: 0.9rem; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 0 6px rgba(94, 234, 212, 0.05);
  transition: transform 0.3s;
  transform-style: preserve-3d;
}
.about-photo img { display: block; width: 100%; height: auto; }
.about-verified {
  position: absolute;
  left: 1rem; bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}
.about-text .section-title { margin-bottom: 1.25rem; }
.about-text > p { color: var(--text-muted); margin-bottom: 1rem; font-size: 1.02rem; }
.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.75rem 0;
}
.about-stats div {
  flex: 1 1 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.about-stats strong { display: block; font-size: 1.35rem; color: var(--accent); font-weight: 800; }
.about-stats span { font-size: 0.82rem; color: var(--text-muted); }
.about-values h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ===== Project extras ===== */
.project-results {
  list-style: none;
  margin: 0.9rem 0 0.5rem;
  padding: 0;
}
.project-results li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.3rem;
}
.project-results li::before {
  content: '▲';
  position: absolute;
  left: 0;
  font-size: 0.6rem;
  top: 0.35rem;
  color: var(--accent);
}
.project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.project-stack span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}

/* ===== Certifications ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.cert-grid .edu-card { max-width: none; }

/* ===== CTA ===== */
.section-cta {
  text-align: center;
  padding: 7rem 2.5rem;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.cta-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.cta-content > p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}
.cta-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.contact-details {
  margin: 1.5rem 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.contact-details p {
  margin: 0.35rem 0;
}
.contact-details a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.contact-details a:hover {
  text-decoration: underline;
}
.cta-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 7rem;
    text-align: center;
  }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero-visual { height: 280px; margin-top: 1rem; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .nav { padding: 1rem 1.25rem; }
  .section { padding: 4rem 1.25rem; }
  .hero { padding: 6rem 1.25rem 3rem; }
  .services-grid, .projects-grid { grid-template-columns: 1fr; }
}
