:root {
  --bg: #0a0a0f;
  --surface: #14141b;
  --surface-hover: #1a1a24;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --accent-glow: rgba(99, 102, 241, 0.25);
  --border: #1e293b;
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Offset for fixed navbar */
.section { scroll-margin-top: 84px; }
body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.nav-brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1rem;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* Sections */
.section {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.stat {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
}
.stat-value {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: #6366f1;
}
.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.skill-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.skill-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Skill bar animation */
.skill-bar-container {
  margin-top: 1rem;
  height: 6px;
  background: var(--surface-hover);
  border-radius: 999px;
  overflow: hidden;
}
.skill-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 1s ease-out;
}

/* Projects */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.project-card.featured {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}
.project-hero {
  padding: 2rem 2rem 1rem;
}
.project-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.project-title {
  font-family: var(--font-head);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.project-summary {
  color: var(--text-muted);
}

.project-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 1.5rem 2rem 2rem;
}
.project-details h4 {
  font-family: var(--font-head);
  margin: 1.5rem 0 0.5rem;
  color: var(--text-main);
}
.project-details p, .project-details li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.results-list {
  list-style: none;
  padding-left: 0;
}
.results-list li {
  padding-left: 1.5rem;
  position: relative;
}
.results-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #6366f1;
}
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech {
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
}

.project-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.visual-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.diagram {
  width: 100%;
  height: 100%;
  position: relative;
}
.diag-agent, .diag-db, .diag-n8n, .diag-cloud {
  position: absolute;
  padding: 0.5rem 0.8rem;
  background: #14141b;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.diag-agent { top: 10%; left: 10%; }
.diag-db { top: 10%; right: 10%; }
.diag-n8n { bottom: 10%; left: 10%; }
.diag-cloud { bottom: 10%; right: 10%; }
.diag-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.more-coming {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Loading skeleton */
#skeleton {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.4s ease;
}
.skeleton-header {
  width: 60vw; height: 24px; background: var(--surface); border-radius: 8px;
  animation: pulse 1.5s infinite;
}
.skeleton-text {
  width: 40vw; height: 16px; background: var(--surface); border-radius: 6px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

/* Parallax effect base (will be updated via JS) */
.parallax {
  will-change: transform;
}

/* Certifications */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.cert-card:hover {
  transform: translateY(-4px);
  border-color: #6366f1;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.cert-badge {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: contain;
  background: var(--bg);
  padding: 0.5rem;
}
.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cert-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.cert-issuer {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.cert-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Badge iframe containers */
.iframe-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
iframe {
  border: none;
  border-radius: 12px;
  background: var(--surface);
  min-height: 260px;
}
.badge-fallback, .cert-fallback {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}
.badge-fallback a, .cert-fallback a {
  color: var(--text-main);
  text-decoration: underline;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.contact-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.contact-value {
  color: var(--text-main);
  text-decoration: none;
}
.contact-value:hover {
  color: #6366f1;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .about-grid, .project-content { grid-template-columns: 1fr; }
  .project-visual { order: -1; }
  .hero-title { font-size: 2.5rem; }
}