:root{
  --bg: #08090c;
  --bg-elev: #0f1116;
  --border: #1e2129;
  --text: #eef0f4;
  --text-dim: #9aa0ac;
  --text-faint: #5b6170;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Space Grotesk', sans-serif;
  --max: 960px;
}

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

html{scroll-behavior:smooth;}

body{
  background:var(--bg);
  background-image:
    linear-gradient(rgba(125,211,252,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,.05) 1px, transparent 1px);
  background-size:48px 48px;
  background-position:center top;
  color:var(--text);
  font-family:var(--sans);
  line-height:1.5;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

::selection{background:var(--accent); color:#08090c;}

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

.noise{
  position:fixed; inset:0; pointer-events:none; z-index:1; opacity:.03;
  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");
}

.glow{
  position:fixed; border-radius:50%; filter:blur(120px); pointer-events:none; z-index:0;
}
.glow-1{
  width:500px; height:500px; top:-150px; right:-150px;
  background:radial-gradient(circle, rgba(125,211,252,.18), transparent 70%);
}
.glow-2{
  width:600px; height:600px; bottom:-200px; left:-200px;
  background:radial-gradient(circle, rgba(167,139,250,.14), transparent 70%);
}

/* ---------- NAV ---------- */
.nav-wrap{
  position:sticky; top:0; z-index:50;
  backdrop-filter:blur(12px);
  background:rgba(8,9,12,.7);
  border-bottom:1px solid var(--border);
}
.nav{
  max-width:var(--max); margin:0 auto; padding:18px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.logo{
  font-family:var(--mono); font-weight:600; font-size:1.1rem; letter-spacing:-.02em;
}
.logo .dot{color:var(--accent);}

.nav-links{
  list-style:none; display:flex; gap:32px; align-items:center;
}
.nav-links a{
  font-size:.95rem; color:var(--text-dim); transition:color .2s;
}
.nav-links a:hover{color:var(--text);}
.nav-cta{
  color:var(--text) !important;
  border:1px solid var(--border);
  padding:8px 16px !important;
  border-radius:999px;
}
.nav-cta:hover{border-color:var(--accent); background:rgba(125,211,252,.08);}

.nav-toggle{
  display:none; flex-direction:column; gap:5px;
  background:none; border:none; cursor:pointer; padding:8px; z-index:60;
}
.nav-toggle span{
  width:22px; height:2px; background:var(--text); border-radius:2px; transition:.25s;
}

/* ---------- HERO ---------- */
.hero{
  min-height:88vh;
  max-width:var(--max); margin:0 auto; padding:0 24px;
  display:flex; flex-direction:column; justify-content:center;
  position:relative; z-index:2;
}

.net-graphic{
  position:absolute; top:50%; right:-40px; transform:translateY(-50%);
  width:380px; height:auto; color:var(--accent); opacity:.18;
  z-index:-1; pointer-events:none;
}
.net-graphic .node{ animation:pulse 2.6s ease-in-out infinite; }
.net-graphic .node:nth-child(2){ animation-delay:.3s; }
.net-graphic .node:nth-child(3){ animation-delay:.6s; }
.net-graphic .node:nth-child(4){ animation-delay:.9s; }
.net-graphic .node:nth-child(5){ animation-delay:1.2s; }
.net-graphic .node:nth-child(6){ animation-delay:1.5s; }
@keyframes pulse{
  0%, 100%{ opacity:1; }
  50%{ opacity:.35; }
}

.status-badge{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--mono); font-size:.82rem; color:var(--text-dim);
  margin-top:22px; padding:8px 14px; border:1px solid var(--border); border-radius:999px;
  width:fit-content;
}
.status-badge.sm{
  margin-top:0; padding:5px 10px; font-size:.72rem; gap:7px;
}
.status-dot{
  width:8px; height:8px; border-radius:50%; background:#4ade80;
  box-shadow:0 0 0 0 rgba(74,222,128,.6);
  animation:status-ping 2s infinite;
}
@keyframes status-ping{
  0%{ box-shadow:0 0 0 0 rgba(74,222,128,.5); }
  70%{ box-shadow:0 0 0 8px rgba(74,222,128,0); }
  100%{ box-shadow:0 0 0 0 rgba(74,222,128,0); }
}

/* ---------- TERMINAL ---------- */
.terminal{
  position:absolute; top:50%; right:0; transform:translateY(-50%);
  width:400px; max-width:44vw;
  background:rgba(15,17,22,.85); backdrop-filter:blur(8px);
  border:1px solid var(--border); border-radius:12px;
  overflow:hidden; z-index:1;
  box-shadow:0 20px 60px rgba(0,0,0,.4);
}
.terminal-bar{
  display:flex; align-items:center; gap:7px;
  padding:10px 14px; background:rgba(255,255,255,.03);
  border-bottom:1px solid var(--border);
}
.t-dot{ width:9px; height:9px; border-radius:50%; }
.t-red{ background:#f87171; }
.t-yellow{ background:#facc15; }
.t-green{ background:#4ade80; }
.terminal-title{
  margin-left:8px; font-family:var(--mono); font-size:.72rem; color:var(--text-faint);
}
.terminal-body{
  padding:18px 16px; font-family:var(--mono); font-size:.82rem; line-height:1.9;
  min-height:180px; color:var(--text-dim);
}
.terminal-body .t-prompt{ color:var(--accent-2); }
.terminal-body .t-out{ color:var(--text); display:block; margin-bottom:6px; }
.terminal-caret{
  display:inline-block; width:7px; height:14px; background:var(--accent);
  vertical-align:middle; margin-left:2px; animation:blink 1s step-end infinite;
}
.eyebrow{
  font-family:var(--mono); color:var(--accent); font-size:.95rem; margin-bottom:16px;
  letter-spacing:.02em;
}
.hero-name{
  font-size:clamp(2.6rem, 8vw, 5rem);
  font-weight:700; letter-spacing:-.03em; line-height:1.05;
}
.cursor{
  color:var(--accent); animation:blink 1s step-end infinite; font-weight:400;
}
@keyframes blink{ 50%{opacity:0;} }

.hero-role{
  font-size:clamp(1.1rem, 2.4vw, 1.4rem);
  color:var(--text-dim); margin-top:20px; max-width:600px;
}
.hero-sub{
  font-family:var(--mono); font-size:.9rem; color:var(--text-faint); margin-top:12px;
}
.hero-actions{
  display:flex; gap:16px; margin-top:36px; flex-wrap:wrap;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:13px 26px; border-radius:10px; font-weight:600; font-size:.95rem;
  transition:transform .15s, background .2s, border-color .2s;
}
.btn:active{transform:scale(.97);}
.btn-primary{
  background:var(--accent); color:#08090c;
}
.btn-primary:hover{background:#a3e0fd;}
.btn-ghost{
  border:1px solid var(--border); color:var(--text);
}
.btn-ghost:hover{border-color:var(--text-dim);}
.btn-lg{padding:16px 32px; font-size:1rem;}

.hero-socials{
  display:flex; gap:20px; margin-top:44px;
}
.hero-socials a{
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--border); border-radius:10px; color:var(--text-dim);
  transition:.2s;
}
.hero-socials svg{width:18px; height:18px;}
.hero-socials a:hover{color:var(--accent); border-color:var(--accent);}

/* ---------- SECTIONS ---------- */
.section{
  max-width:var(--max); margin:0 auto; padding:120px 24px;
  position:relative; z-index:2;
}
.section-head{
  display:flex; align-items:baseline; gap:14px; margin-bottom:48px;
}
.section-num{
  font-family:var(--mono); color:var(--accent); font-size:.9rem;
}
.section-head h2{
  font-size:clamp(1.6rem, 3vw, 2.2rem); font-weight:700; letter-spacing:-.02em;
}
.section-head::after{
  content:''; flex:1; height:1px; background:var(--border);
}
.section-sub{
  color:var(--text-dim); font-size:.95rem; margin-top:-28px; margin-bottom:40px;
}

/* ---------- ABOUT ---------- */
.about-grid{
  display:grid; grid-template-columns:1.4fr 1fr; gap:60px;
}
.about-text{
  color:var(--text-dim); font-size:1.05rem; line-height:1.75;
}
.about-facts{
  list-style:none; display:flex; flex-direction:column; gap:16px;
  border-left:1px solid var(--border); padding-left:24px;
}
.about-facts li{
  font-size:.95rem; color:var(--text);
}
.about-facts span{
  display:block; font-family:var(--mono); font-size:.75rem; color:var(--text-faint);
  text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px;
}

/* ---------- STATS STRIP ---------- */
.stats-strip{
  max-width:var(--max); margin:0 auto; padding:0 24px 100px;
  position:relative; z-index:2;
}
.stats-grid{
  display:grid; grid-template-columns:repeat(4, 1fr);
  border:1px solid var(--border); border-radius:16px; overflow:hidden;
}
.stat-item{
  padding:32px 20px; text-align:center;
  border-right:1px solid var(--border);
  display:flex; flex-direction:column; gap:8px;
  background:var(--bg-elev);
}
.stat-item:last-child{ border-right:none; }
.stat-num{
  font-family:var(--mono); font-size:clamp(1.6rem, 3vw, 2.2rem); font-weight:600; color:var(--accent);
}
.stat-label{
  font-size:.8rem; color:var(--text-dim);
}

/* ---------- EXPERIENCE / TIMELINE ---------- */
.timeline-company{
  display:flex; align-items:baseline; justify-content:space-between;
  padding-bottom:20px; margin-bottom:32px; border-bottom:1px solid var(--border);
}
.timeline-company h3{
  font-size:1.3rem; font-weight:700;
}
.timeline-range{
  font-family:var(--mono); font-size:.85rem; color:var(--accent);
}

.timeline{
  position:relative;
}
.timeline-packet{
  position:absolute; left:4px; top:0; width:3px; height:18px;
  background:linear-gradient(var(--accent), transparent);
  border-radius:2px; box-shadow:0 0 10px var(--accent);
  animation:packet-flow 5s linear infinite;
  z-index:1;
}
@keyframes packet-flow{
  0%{ top:0; opacity:0; }
  8%{ opacity:1; }
  92%{ opacity:1; }
  100%{ top:100%; opacity:0; }
}
.timeline-item{
  position:relative;
  padding-left:32px;
  padding-bottom:40px;
  border-left:1px solid var(--border);
  margin-left:5px;
}
.timeline-item:last-child{
  padding-bottom:0;
}
.timeline-marker{
  position:absolute; left:-6px; top:4px;
  width:11px; height:11px; border-radius:50%;
  background:var(--bg); border:2px solid var(--accent);
}
.timeline-top{
  display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between;
  gap:8px; margin-bottom:12px;
}
.timeline-top h4{
  font-size:1.1rem; font-weight:600;
}
.timeline-date{
  font-family:var(--mono); font-size:.8rem; color:var(--text-faint); white-space:nowrap;
}
.timeline-content ul{
  list-style:none; display:flex; flex-direction:column; gap:10px;
}
.timeline-content li{
  color:var(--text-dim); font-size:.93rem; line-height:1.6; padding-left:18px; position:relative;
}
.timeline-content li::before{
  content:'▸'; position:absolute; left:0; color:var(--accent-2); font-size:.8rem;
}

/* ---------- PROJECTS ---------- */
.project-grid{
  display:grid; grid-template-columns:repeat(2, 1fr); gap:24px;
}
.project-card{
  background:var(--bg-elev); border:1px solid var(--border); border-radius:16px;
  padding:28px; transition:border-color .2s, transform .2s;
}
.project-card:hover{
  border-color:rgba(125,211,252,.4); transform:translateY(-4px);
}
.project-card.compact{
  padding:22px;
}
.project-right{
  display:flex; align-items:center; gap:14px;
}
.project-card.featured{
  grid-column:1 / -1;
}
.project-card.compact h3{
  font-size:1.1rem;
}
.project-card.compact p{
  font-size:.88rem;
}
.project-top{
  display:flex; justify-content:space-between; align-items:center; margin-bottom:16px;
}
.project-tag{
  font-family:var(--mono); font-size:.72rem; color:var(--accent-2);
  border:1px solid rgba(167,139,250,.3); padding:4px 10px; border-radius:999px;
}
.project-link{
  color:var(--text-dim); font-size:1.1rem; transition:.2s;
}
.project-link:hover{color:var(--accent);}
.project-card h3{
  font-size:1.25rem; margin-bottom:10px; font-weight:600;
}
.project-card p{
  color:var(--text-dim); font-size:.92rem; line-height:1.65; margin-bottom:18px;
}
.project-stack{
  display:flex; gap:8px; flex-wrap:wrap;
}
.project-stack span{
  font-family:var(--mono); font-size:.72rem; color:var(--text-faint);
  border:1px solid var(--border); padding:4px 10px; border-radius:6px;
}

/* ---------- SKILLS ---------- */
.skills-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:32px 40px;
}
.skill-group h4{
  font-size:.85rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--text-faint); margin-bottom:16px; font-weight:600;
}
.chips{display:flex; flex-wrap:wrap; gap:10px;}
.chips span{
  background:var(--bg-elev); border:1px solid var(--border);
  padding:8px 14px; border-radius:8px; font-size:.88rem; color:var(--text);
}

/* ---------- CONTACT ---------- */
.contact-box{
  background:var(--bg-elev); border:1px solid var(--border); border-radius:20px;
  padding:60px 40px; text-align:center; display:flex; flex-direction:column;
  align-items:center; gap:28px;
}
.contact-box p{color:var(--text-dim); font-size:1.1rem; max-width:420px;}

/* ---------- FOOTER ---------- */
.footer{
  max-width:var(--max); margin:0 auto; padding:32px 24px 60px;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px;
  color:var(--text-faint); font-size:.85rem; position:relative; z-index:2;
}
.footer-links{display:flex; gap:20px;}
.footer-links a{color:var(--text-faint); transition:.2s;}
.footer-links a:hover{color:var(--text);}

/* ---------- REVEAL ANIMATION ---------- */
.reveal{
  opacity:0; transform:translateY(16px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.in{opacity:1; transform:translateY(0);}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px){
  .net-graphic{ opacity:.12; width:260px; right:-80px; }
  .terminal{ max-width:50vw; }
}

@media (max-width: 900px){
  .terminal{ display:none; }
  .hero{ padding-top:100px; }
}

@media (max-width: 820px){
  .about-grid{grid-template-columns:1fr; gap:32px;}
  .about-facts{border-left:none; padding-left:0; border-top:1px solid var(--border); padding-top:24px;}
  .project-grid{grid-template-columns:1fr;}
  .skills-grid{grid-template-columns:repeat(2, 1fr); gap:28px;}
  .net-graphic{ display:none; }
  .stats-grid{grid-template-columns:repeat(2, 1fr);}
  .stat-item{border-bottom:1px solid var(--border);}
  .stat-item:nth-child(2n){border-right:none;}
}

@media (max-width: 680px){
  .nav-toggle{display:flex;}
  .nav-links{
    position:fixed; inset:0 0 0 auto; width:70%; height:100vh;
    background:var(--bg-elev); border-left:1px solid var(--border);
    flex-direction:column; justify-content:center; align-items:flex-start;
    padding:40px; gap:28px;
    transform:translateX(100%); transition:transform .3s ease;
  }
  .nav-links.open{transform:translateX(0);}
  .nav-links a{font-size:1.1rem;}

  .hero{min-height:82vh;}
  .hero-actions{flex-direction:column; align-items:stretch;}
  .section{padding:80px 20px;}
  .contact-box{padding:40px 24px;}
  .footer{flex-direction:column; align-items:flex-start;}
  .skills-grid{grid-template-columns:1fr;}
  .timeline-item{padding-left:24px;}
  .timeline-company{flex-direction:column; align-items:flex-start; gap:6px;}
  .stats-strip{padding-bottom:60px;}
  .stats-grid{grid-template-columns:1fr;}
  .stat-item{border-right:none; border-bottom:1px solid var(--border);}
  .stat-item:last-child{border-bottom:none;}
}

@media (max-width: 400px){
  .hero-socials{gap:14px;}
}
