:root{
  --bg: #071018;
  --panel: rgba(14, 20, 29, 0.76);
  --panel-strong: rgba(16, 24, 35, 0.95);
  --line: rgba(255,255,255,0.08);
  --text: #edf4fb;
  --muted: rgba(237,244,251,0.70);
  --accent: #3ddc84;
  --accent-2: #79a7ff;
  --shadow: 0 24px 90px rgba(0,0,0,0.34);
  --radius: 24px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(61,220,132,0.10), transparent 28%),
    radial-gradient(circle at 95% 8%, rgba(121,167,255,0.10), transparent 24%),
    linear-gradient(180deg, #05080c 0%, #081018 100%);
  min-height:100vh;
  overflow-x:hidden;
}
a{ color:inherit; text-decoration:none; }
button{ font:inherit; }

.skip-link{
  position:absolute;
  left:-999px;
  top:10px;
  background:var(--accent);
  color:#04130b;
  padding:10px 14px;
  border-radius:999px;
  z-index:50;
}
.skip-link:focus{ left:12px; }

.bg-orb{
  position:fixed;
  width:420px;
  height:420px;
  border-radius:50%;
  filter:blur(110px);
  opacity:0.10;
  pointer-events:none;
  z-index:0;
}
.orb-a{ background:var(--accent); top:-120px; right:-140px; }
.orb-b{ background:var(--accent-2); bottom:-160px; left:-160px; }

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

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:18px 28px;
  backdrop-filter: blur(18px);
  background: rgba(7,16,24,0.62);
  border-bottom:1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.mark{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:800;
  color:#04130b;
  background: linear-gradient(135deg, var(--accent), #a7f9cc);
}
.brand-name{ font-weight:800; letter-spacing:0.2px; }
.brand-sub{ color:var(--muted); font-size:0.9rem; margin-top:2px; }

.top-actions{
  display:flex;
  gap:16px;
  color:var(--muted);
  flex-wrap:wrap;
}
.top-link:hover{ color:var(--text); }

.shell{
  position:relative;
  z-index:1;
  max-width:1480px;
  margin:0 auto;
  padding:24px;
  display:grid;
  grid-template-columns: 336px minmax(0, 1fr);
  gap:24px;
}

.rail{
  position:sticky;
  top:92px;
  align-self:start;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.panel, .card{
  background: var(--panel);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel{
  padding:20px;
}

.eyebrow{
  margin:0 0 8px;
  color:var(--accent);
  letter-spacing:0.16em;
  text-transform:uppercase;
  font-size:0.72rem;
  font-weight:800;
}

.mode-head{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.panel h2{
  margin:0;
  font-size:1.45rem;
}
.muted{ color:var(--muted); line-height:1.7; }

.toggle-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.toggle, .tab, .button{
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color:var(--text);
  border-radius:999px;
  cursor:pointer;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}
.toggle, .tab{
  padding:10px 14px;
}
.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 18px;
}
.toggle:hover, .tab:hover, .button:hover{ transform: translateY(-1px); }
.toggle.active, .tab.active{
  background: rgba(61,220,132,0.14);
  border-color: rgba(61,220,132,0.42);
  color: #d7ffe9;
}

.metrics-panel{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.metric{
  padding:14px;
  border-radius:18px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.metric strong{
  display:block;
  font-size:1.45rem;
  margin-bottom:6px;
}
.metric span{
  color:var(--muted);
  font-size:0.88rem;
  line-height:1.45;
}

.terminal-panel{
  display:flex;
  flex-direction:column;
  min-height:220px;
}
.terminal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-family:"JetBrains Mono", monospace;
  font-size:0.8rem;
  padding-bottom:12px;
}
.status-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--accent);
  box-shadow: 0 0 0 6px rgba(61,220,132,0.09);
}
.terminal-body{
  flex:1;
  padding:14px;
  border-radius:18px;
  background: rgba(0,0,0,0.22);
  font-family:"JetBrains Mono", monospace;
  font-size:0.86rem;
  line-height:1.75;
  color:#d6efe2;
  overflow:auto;
}
.log-line{ opacity:0.95; }

.contact-panel{
  display:grid;
  gap:10px;
}
.contact-panel a{
  color:#caffe5;
  border-bottom:1px solid rgba(61,220,132,0.26);
  width: fit-content;
}

.story{ min-width:0; }

.chapter{
  padding:28px;
  margin-bottom:24px;
}
.hero{
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap:22px;
  align-items:stretch;
}
.hero-copy h1{
  margin:0;
  max-width:12ch;
  font-size: clamp(2.3rem, 4vw, 4.8rem);
  line-height:1.02;
  letter-spacing:-0.04em;
}
.lede{
  margin:18px 0 0;
  max-width:62ch;
  color:var(--muted);
  font-size:1.05rem;
  line-height:1.85;
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px;
}
.button.primary{
  background: linear-gradient(135deg, rgba(61,220,132,0.95), rgba(121,167,255,0.86));
  color:#04130b;
  border-color:transparent;
  font-weight:800;
}
.pill-row, .chips, .mini-stack{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}
.pill-row span, .chips span, .mini-stack span{
  display:inline-flex;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color:var(--text);
  border-radius:999px;
  padding:8px 12px;
  font-size:0.88rem;
}

.hero-card{
  padding:20px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(61,220,132,0.11), transparent 34%),
    rgba(15,22,31,0.92);
}
.profile-head{
  display:flex;
  align-items:center;
  gap:14px;
}
.avatar{
  width:64px;
  height:64px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-weight:800;
  color:#04130b;
  background: linear-gradient(135deg, var(--accent), #b6ffd7);
}
.profile-name{
  font-size:1.2rem;
  font-weight:800;
}
.profile-role{
  color:var(--muted);
  margin-top:4px;
}
.impact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:20px;
}
.impact-grid article{
  padding:16px;
  border-radius:18px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.impact-grid strong{
  display:block;
  font-size:1.55rem;
  margin-bottom:6px;
}
.impact-grid span{
  color:var(--muted);
  line-height:1.45;
}

.section-head{
  margin-bottom:18px;
}
.section-head h2{
  margin:0;
  max-width:22ch;
  font-size: clamp(1.45rem, 2.4vw, 2.45rem);
  letter-spacing:-0.02em;
}

.split-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:16px;
}
.card{
  padding:22px;
}
.card h3, .timeline-item h3, .education-card h3, .contact-card h3, .skill-card h3{
  margin:10px 0 10px;
  font-size:1.32rem;
}
.card p, .timeline-item p, .education-card p, .contact-card p, .skill-card p{
  color:var(--muted);
  line-height:1.75;
}
.card, .timeline-item, .skill-card, .education-card, .contact-card, .playground-main, .playground-side{
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover, .timeline-item:hover, .skill-card:hover, .education-card:hover, .contact-card:hover{
  transform: translateY(-2px);
}

.timeline{
  display:grid;
  gap:16px;
}
.timeline-item{
  padding:22px;
}
.meta-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:0.92rem;
}
.company{
  color: var(--accent);
  font-weight:700;
}
.date{
  white-space:nowrap;
}

.project-tag{
  color:var(--accent);
  letter-spacing:0.14em;
  text-transform:uppercase;
  font-size:0.72rem;
  font-weight:800;
}
.bullets{
  padding-left:18px;
  color:var(--muted);
  line-height:1.85;
}
.links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:18px;
}
.links a{
  color:#d7ffe9;
  border-bottom:1px solid rgba(61,220,132,0.28);
}
.mini-stack{
  margin-top:16px;
}
.muted.small{ font-size:0.92rem; }

.playground{
  display:grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.6fr);
  gap:16px;
}
.playground-main, .playground-side{
  padding:22px;
}
.tab-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.stage{
  display:grid;
  gap:18px;
}
.flow{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  padding:16px;
  border-radius:20px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.node{
  padding:11px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.node.active{
  border-color: rgba(61,220,132,0.52);
  background: rgba(61,220,132,0.14);
}
.arrow{
  color:var(--muted);
  font-size:1.08rem;
}
.play-copy h3{
  margin:0 0 8px;
  font-size:1.4rem;
}
.signal-list{
  display:grid;
  gap:10px;
}
.signal{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.skills-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:16px;
}
.skill-card{
  min-height:168px;
}
.education-card, .contact-card{
  min-height:160px;
}

.footer{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:18px 6px 42px;
  margin:14px 0 20px;
  color:var(--muted);
  border-top:1px solid var(--line);
}

.reveal{
  opacity:0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible{
  opacity:1;
  transform: translateY(0);
}

@media (max-width: 1180px){
  .shell{ grid-template-columns: 1fr; }
  .rail{
    position:static;
    order:2;
  }
}
@media (max-width: 920px){
  .topbar{
    padding:16px 18px;
  }
  .top-actions{ display:none; }
  .shell{ padding:14px; }
  .chapter{ padding:20px; }
  .hero, .split-grid, .playground, .skills-grid{
    grid-template-columns:1fr;
  }
  .meta-row{
    flex-direction:column;
  }
}
