:root {
  --bg: #ffffff;
  --bg-subtle: #f6f9fc;
  --text: #0a2540;
  --text-secondary: #425466;
  --text-muted: #697386;
  --accent: #635bff;
  --accent-hover: #5248f5;
  --accent-soft: rgba(99, 91, 255, 0.1);
  --border: #e3e8ee;
  --shadow-sm: 0 2px 6px rgba(10, 37, 64, 0.05);
  --shadow-md: 0 12px 32px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 24px 60px rgba(10, 37, 64, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #635bff, #00d4ff);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(99, 91, 255, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: var(--bg-subtle);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.15s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-lg { padding: 11px 20px; font-size: 14px; }

/* Stripe Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-gradient-bg {
  position: absolute;
  inset: -120px 0 auto 0;
  height: 460px;
  background:
    radial-gradient(at 15% 20%, rgba(169, 96, 238, 0.28) 0px, transparent 52%),
    radial-gradient(at 85% 15%, rgba(0, 212, 255, 0.28) 0px, transparent 50%),
    radial-gradient(at 55% 60%, rgba(255, 122, 89, 0.18) 0px, transparent 55%),
    linear-gradient(135deg, #f5f3ff 0%, #eef9ff 50%, #ffffff 100%);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
  pointer-events: none;
}

.grid-guides {
  position: absolute;
  inset: 0;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}

.grid-guides span {
  border-left: 1px dashed rgba(10, 37, 64, 0.055);
}

.grid-guides span:last-child {
  border-right: 1px dashed rgba(10, 37, 64, 0.055);
}

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

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--text);
}

.hero-role {
  margin: 12px 0 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--accent);
}

.hero-summary {
  margin: 18px 0 26px;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 58ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Stripe-style Dark Code Spec Card inside Light Mode */
.hero-card {
  background: #0a2540;
  color: #e6edf7;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(10, 37, 64, 0.15);
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #112f4f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dots { display: inline-flex; gap: 6px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.24); display: block; }
.card-filename { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #94a3b8; }

.code-preview {
  margin: 0;
  padding: 18px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.6px;
  line-height: 1.65;
  overflow-x: auto;
}

.tk-key { color: #80e9ff; }
.tk-str { color: #a7f3d0; }
.tk-num { color: #fde68a; }

/* Metrics Strip */
.metrics-strip {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.metric-item {
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.metric-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Alternating Bands */
.band-subtle {
  background: var(--bg-subtle);
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.band-white {
  background: var(--bg);
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 36px;
  max-width: 660px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

/* Skills Cards */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.skill-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s, transform 0.18s;
}

.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.ic-indigo { background: rgba(99, 91, 255, 0.12); color: #635bff; }
.ic-cyan { background: rgba(0, 180, 216, 0.12); color: #0096c7; }
.ic-emerald { background: rgba(16, 185, 129, 0.12); color: #059669; }
.ic-amber { background: rgba(245, 158, 11, 0.14); color: #d97706; }

.skill-card h3 { margin: 0 0 6px; font-size: 17.5px; }
.skill-card p { margin: 0 0 16px; font-size: 14px; color: var(--text-secondary); }

.pill-group { display: flex; flex-wrap: wrap; gap: 7px; }

.pill {
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Experience Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exp-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.exp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.exp-head h3 { margin: 0; font-size: 18.5px; }

.exp-company {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

.exp-company span { font-weight: 400; color: var(--text-muted); }

.exp-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.exp-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
}

.exp-bullets li { margin-bottom: 8px; font-size: 14.6px; }
.exp-bullets li:last-child { margin-bottom: 0; }
.exp-bullets li strong { color: var(--text); }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

.project-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

.project-link:hover { text-decoration: underline; }

.project-card h3 { margin: 0 0 4px; font-size: 18px; }
.project-tech { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--accent); }
.project-card p:last-child { margin: 0; font-size: 14.5px; color: var(--text-secondary); }

/* Education */
.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 28px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.edu-card h3 { margin: 4px 0; font-size: 18px; }
.edu-card p { margin: 0; color: var(--text-secondary); font-size: 14.5px; }

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  padding: 28px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-sep { margin: 0 8px; color: var(--text-muted); }

.footer-links {
  display: flex;
  gap: 18px;
  font-weight: 500;
}

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

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links, .btn-secondary { display: none; }
  .skills-grid, .projects-grid, .metrics-strip { grid-template-columns: 1fr; }
  .hero-section { padding: 48px 0; }
  .band-subtle, .band-white { padding: 48px 0; }
}

/* Clean Print / PDF Mode */
@media print {
  .site-header, .hero-gradient-bg, .grid-guides, .hero-card, .btn-primary, .btn-ghost { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .hero-section, .band-subtle, .band-white { padding: 14pt 0; background: #fff; border: none; }
  .exp-card, .skill-card, .project-card, .metric-item { box-shadow: none; break-inside: avoid; }
}
