:root {
  --bg: #071116;
  --bg-soft: #0d1d24;
  --panel: rgba(12, 29, 36, 0.62);
  --panel-strong: rgba(13, 30, 38, 0.94);
  --line: rgba(162, 227, 225, 0.18);
  --text: #eff8f6;
  --muted: #a8c4c2;
  --accent: #9ef4d7;
  --accent-2: #f4c16b;
  --accent-3: #77d8ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  --radius: 28px;
  --nav-h: 66px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(119, 216, 255, 0.14), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(244, 193, 107, 0.12), transparent 24%),
    linear-gradient(180deg, #071116 0%, #09171d 45%, #071116 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(158, 244, 215, 0.06), transparent 35%),
    radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(158, 244, 215, 0.07), transparent 14%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
canvas { display: block; width: 100%; height: auto; }
.visual-shell canvas { cursor: pointer; }

/* ─── Progress bar ─── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  z-index: 300;
  transition: width 60ms linear;
  pointer-events: none;
}

/* ─── Noise & glows ─── */
.noise, .page-glow { pointer-events: none; position: fixed; z-index: 0; }

.noise {
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.page-glow {
  width: 40rem; height: 40rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  inset: auto;
}

.page-glow-a { top: -10rem; right: -12rem; background: rgba(119, 216, 255, 0.14); }
.page-glow-b { bottom: 10rem; left: -16rem; background: rgba(244, 193, 107, 0.11); }

/* ─── Particles ─── */
.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: particleFloat var(--dur, 9s) ease-in-out infinite var(--dly, 0s);
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: var(--op, 0.2); }
  40%       { transform: translateY(-28px) translateX(8px); opacity: calc(var(--op, 0.2) * 2); }
  70%       { transform: translateY(-14px) translateX(-6px); opacity: var(--op, 0.2); }
}

/* ─── Navigation ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: background 350ms ease, backdrop-filter 350ms ease, border-color 350ms ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(7, 17, 22, 0.84);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom-color: rgba(162, 227, 225, 0.1);
}

.site-nav {
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  position: relative;
  transition: color 200ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 260ms ease;
}

.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.is-active::after { width: 100%; }

.nav-cta { margin-left: auto; padding: 9px 20px; font-size: 0.86rem; }

/* ─── Layout ─── */
main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: var(--nav-h);
  padding-bottom: 80px;
}

.section { padding: 96px 0 0; }

/* ─── Hero ─── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}

/* ─── Reveal animations ─── */
.reveal-item {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 680ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--delay, 0) * 72ms),
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--delay, 0) * 72ms);
}

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

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 680ms ease, transform 680ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ─── Hero title & split text ─── */
.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.95;
  max-width: 12ch;
}

.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.05;
}

.split-word-inner {
  display: inline-block;
  transform: translateY(108%);
  transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1) var(--word-delay, 0ms);
}

.split-word-inner.is-visible { transform: translateY(0); }

.hero-subtitle {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
  line-height: 1.22;
  max-width: 15ch;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
}

.lead {
  color: var(--muted);
  line-height: 1.75;
  max-width: 62ch;
  margin: 24px 0 0;
  font-size: 1.04rem;
}

/* ─── Portrait ─── */
.identity-strip { display: block; margin-top: 28px; }

.portrait-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 28px;
}

.portrait-image {
  width: 136px; min-width: 136px; height: 168px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 40px rgba(0,0,0,0.32);
}

.portrait-copy strong { display: block; margin: 8px 0 6px; font-size: 1.15rem; }
.portrait-copy p { color: var(--muted); line-height: 1.65; }

/* ─── Buttons ─── */
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
  align-items: stretch;
}

.button {
  position: relative;
  overflow: hidden;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.11);
  opacity: 0;
  transition: opacity 200ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:hover::after { opacity: 1; }

.button-primary {
  color: #081317;
  background: linear-gradient(135deg, var(--accent), var(--accent-3) 50%, var(--accent-2));
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  box-shadow: 0 0 28px rgba(158, 244, 215, 0.2);
}

.button-primary:hover { box-shadow: 0 0 44px rgba(158, 244, 215, 0.38); }

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.button-secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.button-secondary:hover {
  border-color: rgba(162, 227, 225, 0.35);
  box-shadow: 0 0 22px rgba(158, 244, 215, 0.1);
}

.contact-cv-btn { margin-top: 24px; }

/* ─── Meta grid ─── */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

/* ─── Card base ─── */
.meta-card,
.portrait-card,
.visual-shell,
.focus-card,
.timeline-body,
.story-card,
.cert-card,
.metrics-panel,
.contact-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.meta-card { padding: 18px; border-radius: 24px; }

.meta-card strong, .focus-card h3, .timeline-body h3, .story-card h3, .cert-card h3 {
  display: block;
  margin-bottom: 8px;
}

.meta-label, .story-tag, .card-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.meta-card p, .focus-card p, .timeline-body p, .story-card p, .cert-card p,
.portrait-copy p, .split-copy p, .contact-copy p, .section-heading p {
  color: var(--muted);
  line-height: 1.75;
}

/* ─── Card hover glow ─── */
.focus-card, .story-card, .cert-card, .meta-card, .timeline-body {
  transition: border-color 260ms ease, box-shadow 260ms ease;
}

.focus-card:hover, .story-card:hover, .cert-card:hover,
.meta-card:hover, .timeline-body:hover {
  border-color: rgba(162, 227, 225, 0.28);
  box-shadow: 0 24px 70px rgba(0,0,0,0.32), 0 0 38px rgba(158,244,215,0.08);
}

/* ─── Hero visual ─── */
.hero-visual { display: flex; justify-content: center; }

.visual-shell {
  width: min(100%, 560px);
  border-radius: 34px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    rgba(12, 29, 36, 0.78);
  transition: box-shadow 300ms ease;
}

.visual-shell:hover {
  box-shadow: var(--shadow), 0 0 56px rgba(158, 244, 215, 0.09);
}

.visual-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.visual-head p { margin: 0 0 0 8px; }

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot--red    { background: #ff5f57; }
.dot--yellow { background: #ffbd2e; }
.dot--green  { background: #28ca41; }

.orb-note {
  margin: 0 6px 14px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(162, 227, 225, 0.12);
  background: rgba(255,255,255,0.025);
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

.orb-insight {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(162, 227, 225, 0.14);
  background: rgba(4, 14, 19, 0.72);
  backdrop-filter: blur(10px);
  transition: border-color 350ms ease;
}

.orb-insight.has-content { border-color: rgba(158, 244, 215, 0.3); }

.orb-insight-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.orb-insight strong { display: block; margin-bottom: 6px; font-size: 1.08rem; }
.orb-insight p { margin: 0; color: var(--muted); line-height: 1.6; }

/* ─── Section heading ─── */
.section-heading { max-width: 920px; margin-bottom: 32px; }

.section-heading h2, .split-copy h2, .contact-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  max-width: 16ch;
}

/* ─── Focus & cert grids ─── */
.focus-grid, .cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.focus-card, .story-card, .cert-card { border-radius: var(--radius); padding: 26px; }

.focus-card h3, .story-card h3, .cert-card h3, .timeline-body h3 {
  margin: 18px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
}

/* ─── Metrics ─── */
.metrics-section { padding-top: 40px; }

.metrics-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: 32px;
}

.metrics-panel article {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  transition: background 240ms ease;
}

.metrics-panel article:hover { background: rgba(255,255,255,0.058); }

.metrics-panel strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  color: var(--accent);
  line-height: 1;
}

.metrics-panel span { color: var(--muted); line-height: 1.6; font-size: 0.9rem; }

/* ─── Timeline ─── */
.timeline { position: relative; display: grid; gap: 18px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 100px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    rgba(158,244,215,0),
    rgba(158,244,215,0.55) 15%,
    rgba(158,244,215,0.55) 85%,
    rgba(158,244,215,0));
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline.line-visible::before { transform: scaleY(1); }

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
}

.timeline-meta {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  padding-top: 18px;
  color: var(--muted);
}

.timeline-meta span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 0.95rem;
}

.timeline-body {
  padding: 26px;
  border-radius: 30px;
  position: relative;
}

.timeline-body::before {
  content: "";
  position: absolute;
  left: -48px; top: 34px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(158,244,215,0.1), 0 0 18px rgba(158,244,215,0.3);
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(158,244,215,0.1), 0 0 18px rgba(158,244,215,0.28); }
  50%       { box-shadow: 0 0 0 10px rgba(158,244,215,0.06), 0 0 32px rgba(158,244,215,0.5); }
}

.timeline-body h4 {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.96rem;
}

/* ─── Split section ─── */
.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 20px;
  align-items: start;
}

.split-stack { display: grid; gap: 18px; }
.story-tag { color: var(--accent-3); }

/* ─── Contact ─── */
.contact-panel {
  border-radius: 34px;
  padding: 32px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
}

.contact-copy p { margin-top: 12px; }

.contact-links { display: grid; gap: 12px; }

.contact-link {
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
  transition: border-color 240ms ease, background 240ms ease, transform 200ms ease;
}

.contact-link:hover {
  border-color: rgba(162, 227, 225, 0.3);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.contact-link span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.contact-link strong { font-size: 1.06rem; }

/* ─── Tech pills ─── */
.tech-cluster { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  border: 1px solid rgba(162, 227, 225, 0.14);
  background: rgba(255,255,255,0.03);
  font-size: 0.9rem;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.tech-pill:hover {
  border-color: rgba(162, 227, 225, 0.3);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.tech-pill b {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(158,244,215,0.95), rgba(119,216,255,0.85));
  color: #071116;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* ─── Back to top ─── */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 90;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 300ms ease, transform 300ms ease, border-color 200ms ease, box-shadow 200ms ease;
  pointer-events: none;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: rgba(162, 227, 225, 0.38);
  box-shadow: 0 0 22px rgba(158,244,215,0.18);
}

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .hero, .split-section, .contact-panel { grid-template-columns: 1fr; }
  .meta-grid, .metrics-panel, .focus-grid, .cert-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: auto; padding-top: 48px; }
  .nav-links { gap: 18px; }
  .site-nav { gap: 20px; }
}

@media (max-width: 960px) {
  .site-nav { gap: 16px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.82rem; }
  .nav-cta {
    padding: 8px 16px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 820px) {
  .meta-grid, .metrics-panel, .focus-grid, .cert-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 15px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .timeline-meta { position: relative; top: auto; padding-left: 38px; }
  .timeline-body::before { left: -18px; }
  .portrait-card { flex-direction: column; align-items: flex-start; }
  .nav-links { display: none; }
  .site-nav { justify-content: space-between; }
  .nav-cta {
    margin-left: 0;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .section { padding-top: 72px; }
  .hero-title { font-size: clamp(2.6rem, 15vw, 4rem); }
  .hero-subtitle { font-size: 1.08rem; }
  .lead { font-size: 0.97rem; }
  .button { width: 100%; }
  .hero-actions { flex-direction: column; }
  .contact-panel, .visual-shell, .metrics-panel { padding: 18px; }
  .timeline-body, .focus-card, .story-card, .cert-card, .contact-link, .portrait-card { padding: 20px; }
  .portrait-image { width: 100%; min-width: 0; height: 180px; }
  .back-to-top { bottom: 18px; right: 18px; }
  .site-header { padding: 0 16px; }
  .site-nav { gap: 12px; }
  .site-header .button,
  .site-header .nav-cta {
    width: auto;
    padding: 8px 14px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .site-header { padding: 0 12px; }
  .nav-logo { font-size: 0.9rem; letter-spacing: 0.08em; }
  .site-header .nav-cta {
    padding: 7px 12px;
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal-item, .reveal { opacity: 1; transform: none; }
  .split-word-inner { transform: none; }
  .timeline::before { transform: scaleY(1); }
}
