:root {
  --bg: #0a0d14;
  --bg-alt: #0e131d;
  --panel: #131a26;
  --gold: #c9a227;
  --gold-bright: #e8c358;
  --indigo: #6c7bff;
  --indigo-bright: #8f9bff;
  --rose: #e0708a;
  --rose-bright: #f091a6;

  /* Dominant brand accent — used broadly (CTAs, kickers, borders, headings).
     Achievement-specific elements (patent badges/certs) reference --gold directly
     so they stay gold in every theme variant. */
  --accent-rgb: 201, 162, 39;
  --accent: var(--gold);
  --accent-bright: var(--gold-bright);

  --panel-border: rgba(var(--accent-rgb), 0.14);
  --ink: #eee9de;
  --ink-dim: #a7adba;
  --ink-faint: #6b7280;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1120px;
}

/* Emerald theme — toggled at runtime via [data-theme] on <html>.
   Achievement-specific elements still reference --gold directly (see above),
   so patent/cert badges stay gold no matter which theme is active. */
[data-theme="emerald"] {
  --accent-rgb: 27, 158, 119;
  --accent: #1b9e77;
  --accent-bright: #2fd9a8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; color: var(--ink); }

.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lead { font-size: 1.15rem; color: var(--ink-dim); max-width: 640px; }

.availability-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #4ade80;
  margin-bottom: 18px;
}

/* Nav */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 13, 20, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
#nav.scrolled { border-bottom-color: var(--panel-border); background: rgba(10, 13, 20, 0.85); }

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-word { display: none; }
@media (min-width: 640px) { .brand-word { display: inline; } }

.theme-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.theme-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  position: relative;
  transition: border-color 0.3s ease;
}
.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8c358, #c9a227);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), background 0.3s ease;
}
[data-theme="emerald"] .theme-toggle-knob {
  transform: translateX(20px);
  background: linear-gradient(135deg, #2fd9a8, #1b9e77);
}
.theme-toggle:hover .theme-toggle-track { border-color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 34px; margin: 0; padding: 0; align-items: center; }
.nav-links a { font-size: 0.92rem; color: var(--ink-dim); transition: color 0.2s ease; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--accent);
  color: var(--accent-bright) !important;
  padding: 8px 18px;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

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

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
}
.orb-1 { width: 480px; height: 480px; background: radial-gradient(circle, rgba(var(--accent-rgb),0.5), transparent 70%); top: -140px; left: -100px; animation: float1 16s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(108,123,255,0.4), transparent 70%); bottom: -120px; right: -80px; animation: float2 18s ease-in-out infinite; }
.orb-3 { width: 320px; height: 320px; background: radial-gradient(circle, rgba(224,112,138,0.32), transparent 70%); top: 30%; right: 12%; animation: float1 22s ease-in-out infinite reverse; }

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px, 60px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px, -40px); } }

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

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 22px;
}

.hero-name {
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 0%, var(--ink) 55%, var(--accent-bright) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--ink-dim);
  margin-top: 26px;
  font-weight: 300;
}

.hero-badges { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badges span {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(201,162,39,0.1);
  border: 1px solid var(--panel-border);
  color: var(--gold-bright);
}
.hero-badges .hb-rose { background: rgba(224,112,138,0.12); border-color: rgba(224,112,138,0.28); color: var(--rose-bright); }
.hero-badges .hb-indigo { background: rgba(108,123,255,0.12); border-color: rgba(108,123,255,0.28); color: var(--indigo-bright); }

.hero-actions { margin-top: 42px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.btn-large { padding: 18px 40px; font-size: 1.05rem; margin-top: 34px; }

.btn {
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-block;
}
.btn-primary { background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #12100a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(var(--accent-rgb),0.5); }
.btn-ghost { border: 1px solid rgba(238,233,222,0.25); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid rgba(238,233,222,0.3);
  border-radius: 14px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }

/* Sections */
.section { padding: 120px 24px; }
.section.alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-inner h2 { font-size: clamp(2rem, 4vw, 2.8rem); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr;
  gap: 60px;
  align-items: center;
}
.about-copy-wrap h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 20px; }
.about-copy-wrap p { margin-top: 0; font-size: 1.15rem; color: var(--ink-dim); max-width: 640px; }
.trait-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.trait {
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb),0.06);
}

.about-visual { display: flex; justify-content: center; }
.photo-frame {
  position: relative;
  width: 260px;
  height: 260px;
}
.photo-frame-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--panel), var(--bg-alt));
  border: 3px solid transparent;
  background-clip: padding-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.photo-frame-inner::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 180deg, var(--accent-bright), var(--indigo), var(--rose), var(--accent-bright));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 10s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-monogram { width: 45%; height: 45%; opacity: 0.9; }
.photo-badge {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--panel-border);
  white-space: nowrap;
  box-shadow: 0 8px 18px -6px rgba(0,0,0,0.5);
}
.photo-badge-1 { top: 6%; right: -8%; color: var(--gold-bright); }
.photo-badge-2 { bottom: 8%; left: -12%; color: var(--rose-bright); }

.stats {
  max-width: var(--max);
  margin: 90px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--panel-border);
  padding-top: 50px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--accent-bright);
  font-weight: 700;
}
.stat-label { font-size: 0.85rem; color: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; }

/* Timeline */
.timeline { max-width: var(--max); margin: 70px auto 0; position: relative; padding-left: 32px; border-left: 1px solid var(--panel-border); }
.tl-item { position: relative; padding-bottom: 56px; padding-left: 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -41px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.15); }
.tl-date { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.tl-content h3 { font-size: 1.5rem; margin-top: 8px; }
.tl-org { color: var(--ink-dim); font-weight: 600; margin: 4px 0 12px; }
.tl-content p:last-child { color: var(--ink-dim); max-width: 680px; margin: 0; }

.education { max-width: var(--max); margin: 60px auto 0; display: flex; gap: 40px; flex-wrap: wrap; }
.edu-item { border: 1px solid var(--panel-border); border-radius: 14px; padding: 20px 26px; display: flex; flex-direction: column; gap: 4px; background: var(--panel); }
.edu-degree { font-family: var(--serif); color: var(--accent-bright); font-size: 1.2rem; }
.edu-field { color: var(--ink-dim); font-size: 0.9rem; }

/* Skills */
.skills-grid { max-width: var(--max); margin: 60px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 16px; padding: 28px; }
.skill-card h3 { font-size: 1.1rem; margin-bottom: 16px; color: var(--accent-bright); font-family: var(--sans); font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { font-size: 0.82rem; padding: 6px 14px; border-radius: 999px; background: rgba(238,233,222,0.06); color: var(--ink-dim); }

.certs { max-width: var(--max); margin: 40px auto 0; display: flex; flex-wrap: wrap; gap: 12px; }
.cert { font-size: 0.82rem; padding: 10px 18px; border-radius: 10px; border: 1px dashed var(--panel-border); color: var(--accent-bright); }

/* Services */
.services-grid { max-width: var(--max); margin: 60px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 16px; padding: 32px 28px; transition: transform 0.25s ease, border-color 0.25s ease; }
.service-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.service-icon { color: var(--accent); font-size: 1.1rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; font-family: var(--sans); font-weight: 700; }
.service-card p { color: var(--ink-dim); font-size: 0.92rem; margin: 0; }

/* Testimonials */
.testimonials-grid { max-width: var(--max); margin: 60px auto 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.testimonial-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
}
.testimonial-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 18px;
}
.testimonial-author { font-size: 0.85rem; color: var(--accent-bright); font-weight: 600; margin: 0; }

/* Mentorship */
.mentorship-grid { max-width: var(--max); margin: 60px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mentor-card { background: linear-gradient(160deg, rgba(var(--accent-rgb),0.08), transparent); border: 1px solid var(--panel-border); border-radius: 16px; padding: 30px; transition: transform 0.25s ease, border-color 0.25s ease; }
.mentor-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.mentor-icon { font-size: 1.8rem; margin-bottom: 14px; }
.mentor-card h3 { font-family: var(--sans); font-size: 1.1rem; color: var(--accent-bright); margin-bottom: 12px; }
.mentor-card p { color: var(--ink-dim); margin: 0; font-size: 0.94rem; }
.highlight-tags { display: flex; flex-direction: column; gap: 8px; }
.highlight-tags span { color: var(--ink); }
.highlight-tags span::before { content: "— "; color: var(--accent); }

/* How I Deliver */
.deliver-grid { max-width: var(--max); margin: 60px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.deliver-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 30px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.deliver-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.deliver-icon { font-size: 1.8rem; margin-bottom: 14px; }
.deliver-card h3 { font-size: 1.05rem; margin-bottom: 10px; font-family: var(--sans); font-weight: 700; color: var(--accent-bright); }
.deliver-card p { color: var(--ink-dim); margin: 0; font-size: 0.9rem; }

/* Markets section accent */
.markets-section { background: radial-gradient(circle at 20% 0%, rgba(108,123,255,0.08), transparent 55%), var(--bg); }
.alt.markets-section { background: radial-gradient(circle at 20% 0%, rgba(108,123,255,0.08), transparent 55%), var(--bg-alt); }

/* Skill card featured */
.skill-card-featured { border-color: rgba(var(--accent-rgb),0.35); background: linear-gradient(160deg, rgba(var(--accent-rgb),0.07), var(--panel)); }
.skill-card-featured h3 { color: var(--accent-bright); }

/* Contact */
.contact-section { text-align: center; }
.contact-section .section-inner { display: flex; flex-direction: column; align-items: center; }
.social-row { margin-top: 34px; display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.social-row a { color: var(--ink-dim); font-size: 0.9rem; letter-spacing: 0.04em; }
.social-row a:hover { color: var(--accent-bright); }
.social-row .social-disabled { color: var(--ink-faint); font-size: 0.9rem; letter-spacing: 0.04em; opacity: 0.45; cursor: default; }

.footer { text-align: center; padding: 36px 24px; color: var(--ink-faint); font-size: 0.85rem; border-top: 1px solid var(--panel-border); }
.footer-mark { width: 40px; height: 40px; opacity: 0.7; margin-bottom: 12px; }

/* Contact page */
.contact-page-header { padding: 160px 24px 40px; text-align: center; }
.contact-page-header .kicker { display: block; }
.contact-page-header h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 16px; }
.contact-page-header .lead { max-width: 560px; margin: 0 auto; }

.contact-form {
  max-width: 620px;
  margin: 50px auto 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 0 24px 100px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.form-group label { font-size: 0.85rem; color: var(--ink-dim); letter-spacing: 0.03em; }
.form-group input,
.form-group textarea {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15);
}
.form-group textarea { min-height: 160px; resize: vertical; font-family: var(--sans); }
.form-note { font-size: 0.8rem; color: var(--ink-faint); margin: 0; }
.contact-form .btn { align-self: flex-start; border: none; cursor: pointer; }

/* Timeline extras */
.tl-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 4px 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 10px;
}
.tl-dot-patent { background: var(--gold-bright); box-shadow: 0 0 0 4px rgba(232,195,88,0.25), 0 0 14px rgba(232,195,88,0.6); }

.cert-patent { border: 1px solid var(--gold); background: rgba(201,162,39,0.1); font-weight: 700; }

.disclaimer {
  max-width: var(--max);
  margin: 40px auto 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-style: italic;
  border-top: 1px solid var(--panel-border);
  padding-top: 24px;
}

/* Floating CTA */
.float-cta {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #12100a;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px -8px rgba(var(--accent-rgb),0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.float-cta.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.float-cta:hover { transform: translateY(-3px); }
.float-cta-ring {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #12100a;
  position: relative;
}
.float-cta-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(18,16,10,0.5);
  animation: pulsering 1.8s ease-out infinite;
}
@keyframes pulsering {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

@media (max-width: 640px) {
  .float-cta span:last-child { display: none; }
  .float-cta { padding: 16px; }
}

/* Responsive */
/* Nav switches to the hamburger menu earlier than the content breakpoint below —
   9 nav items crowd and wrap well before the layout itself needs to stack. */
@media (max-width: 1140px) {
  .nav-links {
    position: fixed;
    top: 64px; right: 0;
    background: rgba(10,13,20,0.97);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px;
    width: 220px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid var(--panel-border);
    height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
}

@media (max-width: 860px) {
  .about-grid, .skills-grid, .services-grid, .mentorship-grid, .deliver-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .photo-frame { width: 200px; height: 200px; }
}
