:root {
  --bg: #0a0f1a;
  --bg-elevated: #111827;
  --bg-card: #162032;
  --bg-card-hover: #1a2740;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(56, 189, 248, 0.4);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.1);
  --accent-glow: rgba(56, 189, 248, 0.22);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --purple: #a78bfa;
  --orange: #fb923c;
  --amber: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(56, 189, 248, 0.14), transparent),
    radial-gradient(ellipse 50% 35% at 100% 40%, rgba(167, 139, 250, 0.07), transparent),
    radial-gradient(ellipse 40% 25% at 0% 75%, rgba(52, 211, 153, 0.05), transparent);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7dd3fc;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 15, 26, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-cta {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(56, 189, 248, 0.22);
  margin-left: 0.25rem;
}

.nav-cta:hover {
  background: rgba(56, 189, 248, 0.18) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Hero ── */
.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-text .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(52, 211, 153, 0.22);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero-text .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-headline {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.hero-lead {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border-hover);
}

/* Profile card */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #6366f1, var(--purple));
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a5f, #312e81);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 1.15rem;
  border: 2px solid var(--border);
}

.profile-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.profile-role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.profile-bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.profile-highlights {
  list-style: none;
  margin-bottom: 1.25rem;
}

.profile-highlights li {
  font-size: 0.82rem;
  color: var(--text-subtle);
  padding: 0.35rem 0;
  padding-left: 1rem;
  position: relative;
}

.profile-highlights li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.profile-meta a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
}

.profile-meta a:hover {
  color: var(--accent);
  text-decoration: none;
}

.profile-meta svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.75;
}

/* ── Sections ── */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-demos {
  background: rgba(255, 255, 255, 0.02);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 580px;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.cert-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.cert-card ul {
  list-style: none;
}

.cert-card li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.cert-card li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cert-card li strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.cert-card li span {
  font-size: 0.78rem;
  color: var(--text-subtle);
}


/* ── Demo cards ── */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.demo-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.demo-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.25s;
}

.demo-card:hover::after {
  opacity: 1;
}

.demo-card[data-accent="sky"]::after { background: var(--accent); }
.demo-card[data-accent="violet"]::after { background: var(--purple); }
.demo-card[data-accent="emerald"]::after { background: var(--green); }
.demo-card[data-accent="orange"]::after { background: var(--orange); }
.demo-card[data-accent="amber"]::after { background: var(--amber); }

.demo-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.demo-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.demo-card[data-accent="sky"] .demo-icon { background: var(--accent-soft); }
.demo-card[data-accent="violet"] .demo-icon { background: rgba(167, 139, 250, 0.12); }
.demo-card[data-accent="emerald"] .demo-icon { background: var(--green-soft); }
.demo-card[data-accent="orange"] .demo-icon { background: rgba(251, 146, 60, 0.12); }
.demo-card[data-accent="amber"] .demo-icon { background: rgba(251, 191, 36, 0.12); }

.demo-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  background: var(--green-soft);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.demo-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.demo-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.55;
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.demo-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-subtle);
}

.demo-creds {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.creds-label {
  color: var(--text-subtle);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.demo-creds code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.demo-creds em {
  color: var(--text-subtle);
  font-style: normal;
  font-size: 0.72rem;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.demo-btn {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.demo-btn-main {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.demo-btn-main:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  text-decoration: none;
}

.demo-btn-alt {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.demo-btn-alt:hover {
  color: var(--text);
  border-color: var(--border-hover);
  text-decoration: none;
}

/* ── Project cards ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.35rem;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.project-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--purple);
  margin-bottom: 0.55rem;
}

.project-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.project-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}

.skill-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.skill-group h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tags span {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.skill-tags span:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* ── Contact ── */
.contact-section {
  padding-bottom: 3rem;
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 50%, rgba(56, 189, 248, 0.06), transparent 60%);
  pointer-events: none;
}

.contact-text {
  position: relative;
  max-width: 480px;
}

.contact-text h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-brand strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-card {
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    text-align: left;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 15, 26, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    gap: 0.15rem;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.65rem 0.85rem;
  }

  .nav-inner {
    position: relative;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .demo-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
