/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #09090f;
  --surface:     #111118;
  --surface-2:   #18182a;
  --accent:      #8b7cf8;
  --accent-2:    #a78bfa;
  --gradient:    linear-gradient(135deg, #b4a7fd 0%, #7c71f0 100%);
  --text:        #eeeef5;
  --text-muted:  #8888a0;
  --border:      rgba(139, 124, 248, 0.18);
  --glow:        rgba(139, 124, 248, 0.10);
  --radius:      14px;
  --radius-sm:   7px;
  --max-w:       1100px;
  --section-pad: 100px 24px;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--text-muted); }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header p { max-width: 560px; margin: 16px auto 0; font-size: 1.05rem; }

/* ─── Nav ────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 9, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(139, 124, 248, 0.08);
}

.nav-logo img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.85; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── Hero ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(139, 124, 248, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(96, 165, 250, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139,124,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,124,248,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 760px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

#hero h1 { margin-bottom: 24px; }
#hero p {
  font-size: 1.15rem;
  max-width: 580px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 28px rgba(139, 124, 248, 0.3);
}
.btn-primary:hover { opacity: 0.88; box-shadow: 0 0 40px rgba(139, 124, 248, 0.4); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-2); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Services ───────────────────────────────────────────────── */
#services { background: var(--surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glow);
  opacity: 0;
  transition: opacity 0.25s;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 44px; height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.service-card h3 { margin-bottom: 10px; color: var(--text); }
.service-card p { font-size: 0.9rem; line-height: 1.65; }

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(139, 124, 248, 0.12);
  color: var(--accent-2);
  border-radius: 100px;
  border: 1px solid rgba(139, 124, 248, 0.2);
}

/* ─── About ──────────────────────────────────────────────────── */
#about .about-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: sticky;
  top: 84px;
}

.about-avatar {
  width: 90px; height: 90px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
}

.about-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.about-card .role { color: var(--accent-2); font-size: 0.88rem; font-weight: 500; margin-bottom: 20px; }

.about-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.about-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
}
.about-link:hover { border-color: var(--accent); color: var(--accent-2); }

.about-bio h2 { margin-bottom: 20px; }
.about-bio p { margin-bottom: 16px; font-size: 1rem; }
.about-bio p:last-of-type { margin-bottom: 0; }

.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 36px;
}
.credential-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.credential-item .c-label { font-size: 0.72rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.credential-item .c-val { font-size: 0.88rem; color: var(--text); font-weight: 500; }

/* ─── Projects ───────────────────────────────────────────────── */
#projects { background: var(--surface); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.project-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.project-company {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-year { font-size: 0.78rem; color: var(--text-muted); }
.project-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.project-card p { font-size: 0.88rem; flex: 1; }
.project-card .service-tags { margin-top: 20px; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  transition: gap 0.2s;
}
.project-link:hover { gap: 10px; }

/* ─── Blog ───────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.blog-card-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.blog-date { font-size: 0.78rem; color: var(--text-muted); }
.blog-read { font-size: 0.78rem; color: var(--text-muted); }
.blog-dot { width: 3px; height: 3px; background: var(--text-muted); border-radius: 50%; }
.blog-card-tag {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(139, 124, 248, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(139, 124, 248, 0.2);
  margin-left: auto;
}

.blog-card h3 { font-size: 1.05rem; margin-bottom: 10px; line-height: 1.35; }
.blog-card p { font-size: 0.88rem; flex: 1; }
.blog-card .project-link { margin-top: 20px; }

.blog-all {
  text-align: center;
  margin-top: 44px;
}

/* ─── Contact ────────────────────────────────────────────────── */
#contact {
  background: var(--surface);
  text-align: center;
}

#contact h2 { margin-bottom: 16px; }
#contact > .container > p { max-width: 500px; margin: 0 auto 40px; font-size: 1.05rem; }

.contact-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
  min-width: 320px;
}

.contact-email {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-note { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: gap;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-logo img { height: 28px; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-2); }

/* ─── Blog post page ─────────────────────────────────────────── */
.blog-post-hero {
  padding: 140px 24px 60px;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.blog-post-hero .section-label { display: block; }
.blog-post-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 16px 0 20px; }
.blog-post-meta {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.blog-post-meta .blog-dot { background: var(--text-muted); }

.blog-post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 100px;
}
.blog-post-body h2 { font-size: 1.5rem; margin: 48px 0 16px; color: var(--text); }
.blog-post-body h3 { font-size: 1.15rem; margin: 32px 0 12px; color: var(--text); }
.blog-post-body p { margin-bottom: 20px; color: var(--text-muted); font-size: 1rem; line-height: 1.8; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 20px 24px; }
.blog-post-body li { color: var(--text-muted); font-size: 1rem; line-height: 1.8; margin-bottom: 6px; }
.blog-post-body strong { color: var(--text); font-weight: 600; }
.blog-post-body a { color: var(--accent-2); border-bottom: 1px solid rgba(167, 139, 250, 0.3); transition: border-color 0.2s; }
.blog-post-body a:hover { border-color: var(--accent-2); }

.blog-post-body .callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 32px 0;
}
.blog-post-body .callout p { margin: 0; }

/* Blog listing page */
.blog-listing-hero {
  padding: 140px 24px 60px;
  text-align: center;
}
.blog-listing-hero h1 { margin-bottom: 12px; }
.blog-listing-hero p { font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.blog-listing-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: 72px 20px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-links { display: none; flex-direction: column; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(9, 9, 15, 0.97);
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
  }
  .nav-burger { display: flex; }

  .hero-stats { gap: 28px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .credentials { grid-template-columns: 1fr; }
  .contact-box { padding: 32px 28px; min-width: 0; width: 100%; max-width: 420px; }

  footer { flex-direction: column; gap: 16px; text-align: center; padding: 28px 20px; }
}
