/* =========================================================
   TOKENS
   ========================================================= */
:root{
  --ink:        #10151C;
  --bg:         #F7F8FA;
  --surface:    #FFFFFF;
  --grid-line:  #DCE2E8;
  --muted:      #5B6672;
  --faint:      #8A93A0;

  --blue:       #2451B8;
  --blue-dim:   #E7EDFA;
  --orange:     #E8622C;
  --orange-dim: #FCE7DD;
  --green:      #1F9D6B;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --max: 1120px;
  --radius: 10px;
}

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

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3{ font-family: var(--font-display); margin:0; }
p{ margin:0; }

/* faint blueprint grid backdrop */
.grid-overlay{
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, black, black 60%, transparent 100%);
}

.muted{ color: var(--muted); font-weight: 400; }

/* =========================================================
   NAV
   ========================================================= */
.nav{
  position: sticky; top:0; z-index: 50;
  background: rgba(247,248,250,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grid-line);
}
.nav-inner{
  max-width: var(--max); margin: 0 auto; padding: 16px 24px;
  display:flex; align-items:center; justify-content: space-between; gap: 24px;
}
.nav-mark{
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  display: flex; align-items: center; gap: 10px;
}
.nav-mark svg{ flex-shrink: 0; }
.nav-links{
  display:flex; gap: 28px;
  font-family: var(--font-mono); font-size: 13px;
}
.nav-links a{ display:flex; align-items:center; gap:6px; color: var(--muted); transition: color .15s ease; }
.nav-links a:hover{ color: var(--ink); }
.stage-tag{
  font-size: 10px; color: var(--faint); border: 1px solid var(--grid-line);
  border-radius: 4px; padding: 1px 5px; font-family: var(--font-mono);
}
.nav-cta{
  font-family: var(--font-mono); font-size: 13px;
  border: 1px solid var(--ink); border-radius: 6px; padding: 8px 14px;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.nav-cta:hover{ background: var(--ink); color: var(--bg); }

@media (max-width: 820px){
  .nav-links{ display:none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero{ position: relative; z-index: 1; padding: 72px 24px 0; }
.hero-inner{
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px;
  align-items: center;
}
.eyebrow{
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  color: var(--muted); display:flex; align-items:center; gap:8px; margin-bottom: 18px;
}
.pulse-dot{
  width:7px; height:7px; border-radius:50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(31,157,107,0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(31,157,107,0.45); }
  70%{ box-shadow: 0 0 0 7px rgba(31,157,107,0); }
  100%{ box-shadow: 0 0 0 0 rgba(31,157,107,0); }
}
.hero-name{
  font-size: clamp(44px, 6vw, 68px); font-weight: 700; line-height: 1;
  letter-spacing: -0.02em;
}
.hero-role{
  font-family: var(--font-mono); font-size: 16px; color: var(--blue);
  margin-top: 14px; font-weight: 500;
}
.hero-desc{
  font-size: 17px; color: var(--muted); max-width: 46ch; margin-top: 18px;
}
.hero-links{ display:flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn{
  font-family: var(--font-mono); font-size: 13px; padding: 11px 18px; border-radius: 7px;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
  display: inline-block;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--ink); color: var(--bg); }
.btn-primary:hover{ background: var(--blue); }
.btn-ghost{ border-color: var(--grid-line); color: var(--ink); }
.btn-ghost:hover{ border-color: var(--ink); }
.hero-location{
  font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-top: 22px;
}

/* --- hero code panel --- */
.hero-panel{
  background: #0F1620; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(16,21,28,0.35);
  border: 1px solid #1E2733;
}
.panel-tabbar{
  display:flex; align-items:center; justify-content: space-between;
  padding: 10px 14px; background: #141D29; border-bottom: 1px solid #1E2733;
}
.tab{
  font-family: var(--font-mono); font-size: 12px; color: #9AB0C7;
  background: #0F1620; padding: 5px 10px; border-radius: 5px 5px 0 0;
}
.panel-dots{ display:flex; gap:6px; }
.panel-dots i{ width:8px; height:8px; border-radius:50%; background:#2B3746; display:inline-block; }
.panel-body{
  margin:0; padding: 22px 20px 26px; font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.85; color: #C9D4E0; overflow-x: auto;
}
.tok-key{ color: #7FB4FF; }
.tok-str{ color: #F2B84B; }
.tok-num{ color: #6FDCC0; }
.tok-punc{ color: #5B6672; }
.cursor{
  display:inline-block; width:7px; height:14px; background:#F2B84B; margin-left:2px;
  animation: blink 1s step-end infinite; transform: translateY(2px);
}
@keyframes blink{ 50%{ opacity:0; } }

/* pipeline strip under hero */
.pipeline-strip{
  max-width: var(--max); margin: 56px auto 0; padding: 16px 24px;
  display:flex; align-items:center; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  color: var(--faint); border-top: 1px dashed var(--grid-line);
}
.pipeline-strip span{ color: var(--muted); }
.pipeline-strip i{ font-style: normal; color: var(--orange); }

@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero{ padding-top: 44px; }
}

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section{ position: relative; z-index: 1; padding: 96px 24px 0; }
.section-inner{ max-width: var(--max); margin: 0 auto; }
.stage-label{
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  display:flex; align-items:center; gap:10px; margin-bottom: 14px;
}
.stage-label .stage-tag{ color: var(--blue); border-color: var(--blue-dim); background: var(--blue-dim); }
.section-title{ font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.01em; }
.section-sub{ color: var(--muted); margin-top: 10px; font-size: 15px; }

/* reveal-on-scroll */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity: 1; transform: none; }

/* =========================================================
   STACK
   ========================================================= */
.stack-grid{
  margin-top: 40px; display:grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px;
}
.stack-group h3{
  font-size: 13px; font-family: var(--font-mono); color: var(--faint);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; font-weight: 500;
}
.chips{ display:flex; flex-wrap: wrap; gap: 8px; }
.chip{
  font-family: var(--font-mono); font-size: 12px; background: var(--surface);
  border: 1px solid var(--grid-line); border-radius: 6px; padding: 6px 10px;
  color: var(--ink);
}
@media (max-width: 900px){ .stack-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .stack-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   EXPERIENCE / TIMELINE
   ========================================================= */
.timeline{ margin-top: 44px; position: relative; padding-left: 26px; }
.timeline::before{
  content:""; position:absolute; left: 5px; top: 6px; bottom: 6px; width: 1px;
  background: var(--grid-line);
}
.job{ position: relative; padding-bottom: 44px; }
.job:last-child{ padding-bottom: 0; }
.job-node{
  position:absolute; left: -26px; top: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--blue);
}
.job-head{
  display:flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.job-head h3{ font-size: 19px; }
.job-date{ font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.job ul{ display:flex; flex-direction:column; gap: 10px; }
.job li{
  position: relative; padding-left: 18px; color: var(--muted); font-size: 14.5px;
}
.job li::before{
  content:""; position:absolute; left:0; top: 9px; width:6px; height:1px; background: var(--orange);
}
.job li strong{ color: var(--ink); font-weight: 600; }

/* =========================================================
   PROJECTS
   ========================================================= */
.project-grid{
  margin-top: 40px; display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}
.project-card{
  background: var(--surface); border: 1px solid var(--grid-line); border-radius: var(--radius);
  padding: 24px; display:flex; flex-direction:column; gap: 12px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.project-card:hover{
  border-color: var(--blue); transform: translateY(-3px);
  box-shadow: 0 16px 32px -20px rgba(36,81,184,0.35);
}
.project-date{ font-family: var(--font-mono); font-size: 11px; color: var(--orange); letter-spacing: .04em; }
.project-card h3{ font-size: 17px; line-height: 1.3; }
.project-card p{ font-size: 14px; color: var(--muted); }
.project-tags{ font-family: var(--font-mono); font-size: 11.5px; color: var(--faint) !important; }
.project-card strong{ color: var(--ink); }

@media (max-width: 900px){ .project-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   EDUCATION
   ========================================================= */
.edu-grid{ margin-top: 40px; display:grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.edu-card{
  background: var(--surface); border: 1px solid var(--grid-line); border-radius: var(--radius); padding: 22px;
}
.edu-card h3{ font-size: 16.5px; margin-bottom: 8px; }
.edu-meta{ font-size: 13px; color: var(--muted); font-family: var(--font-mono); margin-top: 4px; }

.cert-list{ margin-top: 24px; border-top: 1px solid var(--grid-line); }
.cert-item{
  display:flex; align-items:center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; border-bottom: 1px solid var(--grid-line); flex-wrap: wrap;
}
.cert-name{ font-weight: 500; font-size: 14.5px; }
.cert-issuer{ font-size: 13px; color: var(--muted); flex:1; }
.cert-date{ font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

@media (max-width: 700px){ .edu-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  position: relative; z-index: 1; margin-top: 120px;
  background: var(--ink); color: var(--bg);
}
.footer-inner{ max-width: var(--max); margin: 0 auto; padding: 72px 24px 48px; }
.footer-eyebrow{ font-family: var(--font-mono); font-size: 12px; color: var(--orange); margin-bottom: 14px; }
.footer h2{ font-size: clamp(26px, 4vw, 40px); max-width: 16ch; margin-bottom: 28px; }
.footer .btn-primary{ background: var(--orange); color: var(--ink); }
.footer .btn-primary:hover{ background: #fff; }
.footer .btn-ghost{ border-color: #2A3441; color: var(--bg); }
.footer .btn-ghost:hover{ border-color: var(--bg); }
.footer-fine{ font-family: var(--font-mono); font-size: 12px; color: #6B7684; margin-top: 32px; }

/* focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px;
}
