:root {
  --bg: #070b14;
  --bg-elevated: rgba(15, 23, 42, 0.72);
  --bg-card: rgba(17, 25, 45, 0.65);
  --border: rgba(148, 163, 184, 0.14);
  --border-hover: rgba(56, 189, 248, 0.45);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-glow: rgba(56, 189, 248, 0.18);
  --success: #34d399;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: rgba(255, 255, 255, 0.85);
  --bg-card: rgba(255, 255, 255, 0.88);
  --border: rgba(15, 23, 42, 0.1);
  --border-hover: rgba(2, 132, 199, 0.45);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #0284c7;
  --accent-2: #4f46e5;
  --accent-glow: rgba(2, 132, 199, 0.12);
  --success: #059669;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* Ambient Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.45;
}

.orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 70%);
  top: -120px;
  right: -100px;
}

.orb-2 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.3), transparent 70%);
  bottom: 5%;
  left: -120px;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  opacity: 0.35;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-hover);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-elevated);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
}

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

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

.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  background: var(--accent-glow);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 5.5rem 0 4rem;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-glow);
  border: 1px solid var(--border-hover);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.hero-summary {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 1.8rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.8rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-meta svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* Architecture Visual Card */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arch-card {
  padding: 1.25rem;
}

.arch-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-hover);
}

.mono-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.arch-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.arch-layer {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border);
}

.layer-tag {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.layer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.layer-chips span {
  font-size: 0.78rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.stats-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.stat-box {
  padding: 1rem;
  text-align: center;
  border-radius: var(--radius-md);
}

.stat-value {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.section-header {
  max-width: 720px;
  margin-bottom: 2.75rem;
}

.section-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pillar-card {
  padding: 1.6rem;
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.pillar-icon svg {
  width: 22px;
  height: 22px;
}

.pillar-card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.55rem;
}

.pillar-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.timeline-item {
  padding: 1.75rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.timeline-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  margin-bottom: 0.45rem;
}

.timeline-header h3 {
  font-size: 1.25rem;
}

.company {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-meta {
  text-align: right;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.timeline-meta span {
  display: block;
}

.timeline-bullets {
  padding-left: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.timeline-bullets strong {
  color: var(--text);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-tags span {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
}

.project-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.project-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.project-domain {
  color: var(--accent);
}

.project-year {
  color: var(--text-dim);
}

.project-card h3 {
  font-size: 1.25rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  flex: 1;
}

.project-impact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.project-impact span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(52, 211, 153, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

/* Skills */
.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-pill {
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.skill-pill.badge-verified {
  border-color: rgba(52, 211, 153, 0.4);
}

.skill-pill.hidden {
  display: none;
}

.skills-note {
  margin-top: 1rem;
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* Education & Quote */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.35rem;
}

.edu-block, .quote-block {
  padding: 1.85rem;
}

.card-heading {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.edu-item {
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.edu-item h4 {
  font-size: 1.05rem;
}

.edu-school {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.edu-date {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.testimonial-quote {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.4rem;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.quote-author strong {
  display: block;
  font-size: 0.95rem;
}

.quote-author span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Contact */
.contact-card {
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.contact-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.contact-copy p {
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.services-list span {
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border);
  text-align: left;
  width: 100%;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.back-top:hover {
  color: var(--accent);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .pillars-grid,
  .projects-grid,
  .dual-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    display: none;
  }

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

  .mobile-menu-btn {
    display: flex;
  }

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

  .timeline-meta {
    text-align: left;
  }
}
