:root{
  --bg: #0a0e14;
  --bg-alt: #0d1220;
  --surface: #12161f;
  --surface-hi: #171c27;
  --border: rgba(255,255,255,0.08);
  --border-hi: rgba(255,255,255,0.16);
  --text: #e6e9ef;
  --text-muted: #8b93a7;
  --text-dim: #5b6274;
  --accent: #5b8def;
  --accent-2: #22d3ee;
  --accent-3: #6366f1;
  --success: #34d399;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-bg: rgba(10,14,20,0.72);
  color-scheme: dark;
}
html[data-theme="light"]{
  --bg: #f6f7fb;
  --bg-alt: #edf0f6;
  --surface: #ffffff;
  --surface-hi: #f3f5fa;
  --border: rgba(15,20,32,0.09);
  --border-hi: rgba(15,20,32,0.18);
  --text: #10141f;
  --text-muted: #545c70;
  --text-dim: #8890a3;
  --accent: #3563d6;
  --accent-2: #0e7f96;
  --accent-3: #4338ca;
  --header-bg: rgba(255,255,255,0.75);
  color-scheme: light;
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.6;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  transition:background 0.35s ease, color 0.35s ease;
}
body, body *{transition:background 0.35s ease, color 0.35s ease, border-color 0.35s ease;}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
}
a{color:inherit;text-decoration:none;}
ul{list-style:none;}
img,svg{display:block;max-width:100%;}
::selection{background:var(--accent-3); color:#fff;}

.container{max-width:1180px;margin:0 auto;padding:0 32px;}
@media (max-width:640px){.container{padding:0 20px;}}

h1,h2,h3,h4{font-family:var(--font-display); font-weight:600; letter-spacing:-0.02em; line-height:1.1;}
.eyebrow{
  font-family:var(--font-mono);
  font-size:12.5px;
  color:var(--accent-2);
  letter-spacing:0.04em;
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
}
.eyebrow::before{content:"$"; color:var(--text-dim);}
.eyebrow .cursor{display:inline-block;width:7px;height:14px;background:var(--accent-2);animation:blink 1.1s steps(1) infinite;}
@keyframes blink{50%{opacity:0;}}

/* background ambience */
.ambient{position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden;}
.ambient::before, .ambient::after{
  content:""; position:absolute; width:640px; height:640px; border-radius:50%;
  filter:blur(120px); opacity:0.18;
}
html[data-theme="light"] .ambient::before, html[data-theme="light"] .ambient::after{opacity:0.10;}
.ambient::before{background:var(--accent-3); top:-200px; left:-160px;}
.ambient::after{background:var(--accent-2); bottom:-220px; right:-160px;}
.grid-overlay{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size:56px 56px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* progress bar */
#progress-bar{position:fixed; top:0; left:0; height:2px; width:0%; background:linear-gradient(90deg,var(--accent-3),var(--accent-2)); z-index:1000; transition:width 0.1s linear;}

/* nav */
header{
  position:fixed; top:0; left:0; right:0; z-index:900;
  padding:18px 0;
  transition:background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom:1px solid transparent;
}
header.scrolled{
  background:var(--header-bg);
  backdrop-filter:blur(16px) saturate(140%);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
  border-bottom:1px solid var(--border);
  padding:12px 0;
}
nav{display:flex; align-items:center; justify-content:space-between;}
.logo{font-family:var(--font-mono); font-size:15px; font-weight:500; display:flex; align-items:center; gap:8px;}
.logo .dot{width:8px;height:8px;border-radius:50%;background:var(--success); box-shadow:0 0 8px var(--success);}
.nav-links{display:flex; gap:32px; align-items:center;}
.nav-links a{font-size:14.5px; color:var(--text-muted); transition:color 0.2s;}
.nav-links a:hover{color:var(--text);}
.nav-cta{
  font-size:14px; font-weight:500; padding:9px 18px; border-radius:8px;
  background:var(--text); color:var(--bg) !important;
  transition:transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover{transform:translateY(-1px); box-shadow:0 8px 24px rgba(91,141,239,0.25);}
.theme-toggle{
  width:38px; height:38px; border-radius:9px; border:1px solid var(--border); background:var(--surface);
  color:var(--text); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
  transition:border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover{border-color:var(--border-hi); transform:translateY(-1px);}
.theme-toggle svg{width:17px; height:17px;}
.nav-toggle{display:none;}
@media (max-width:860px){
  .nav-links{display:none;}
  .nav-toggle{display:block; background:none; border:1px solid var(--border); color:var(--text); padding:8px 12px; border-radius:8px;}
}

section{position:relative; z-index:1;}

/* hero */
.hero{
  min-height:100vh; display:flex; align-items:center;
  padding:140px 0 80px;
}
.hero-grid{display:grid; grid-template-columns:1.1fr 0.9fr; gap:56px; align-items:center;}
@media (max-width:960px){.hero-grid{grid-template-columns:1fr;}}
.hero h1{font-size:clamp(2.4rem, 5vw, 3.9rem); margin-bottom:22px;}
.hero h1 .grad{
  background:linear-gradient(100deg, var(--accent-2), var(--accent) 55%, var(--accent-3));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p.sub{font-size:1.15rem; color:var(--text-muted); max-width:540px; margin-bottom:36px;}
.hero-ctas{display:flex; gap:14px; flex-wrap:wrap;}
.btn{
  display:inline-flex; align-items:center; gap:8px; font-weight:500; font-size:15px;
  padding:13px 24px; border-radius:10px; border:1px solid transparent; cursor:pointer;
  transition:transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-primary{background:linear-gradient(120deg,var(--accent-3),var(--accent)); color:#fff;}
.btn-primary:hover{transform:translateY(-2px); box-shadow:0 12px 32px rgba(91,141,239,0.35);}
.btn-secondary{background:var(--surface); border-color:var(--border); color:var(--text);}
.btn-secondary:hover{border-color:var(--border-hi); transform:translateY(-2px);}

/* network diagram */
.net-wrap{position:relative; aspect-ratio:1/1; max-width:480px; margin:0 auto;}
.net-wrap svg{width:100%; height:100%;}
.net-line{stroke:url(#lineGrad); stroke-width:1.4; fill:none; opacity:0.55;}
.net-node{fill:var(--surface-hi); stroke:var(--border-hi); stroke-width:1.5;}
.net-node.core{fill:var(--accent-3); stroke:var(--accent-2);}
.net-label{font-family:var(--font-mono); font-size:9px; fill:var(--text-dim);}
.packet{fill:var(--accent-2); filter:drop-shadow(0 0 6px var(--accent-2));}

/* stats */
.stats{padding:70px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:linear-gradient(180deg, transparent, rgba(91,141,239,0.03));}
.stats-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:24px; text-align:center;}
@media (max-width:760px){.stats-grid{grid-template-columns:repeat(2,1fr);}}
.stat-num{font-family:var(--font-display); font-size:2.6rem; font-weight:700; color:var(--text);}
.stat-num .suffix{color:var(--accent-2);}
.stat-label{font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); margin-top:6px;}

.section-pad{padding:120px 0;}
.section-head{max-width:640px; margin-bottom:56px;}
.section-head h2{font-size:clamp(1.8rem,3.4vw,2.6rem); margin-bottom:16px;}
.section-head p{color:var(--text-muted); font-size:1.05rem;}

/* about */
.about-grid{display:grid; grid-template-columns:0.95fr 1.05fr; gap:64px; align-items:start;}
@media (max-width:900px){.about-grid{grid-template-columns:1fr;}}
.about-intro{display:flex; gap:36px; align-items:center; margin-bottom:56px; flex-wrap:wrap;}
.avatar-frame{
  position:relative; width:180px; aspect-ratio:4/5; border-radius:20px; flex-shrink:0;
  padding:3px; background:linear-gradient(135deg, var(--accent-3), var(--accent-2));
}
.avatar-frame img{width:100%; height:100%; object-fit:cover; object-position:center 8%; border-radius:17px; display:block;}
.about-intro-text{flex:1; min-width:260px;}
.about-intro-text .name{font-family:var(--font-display); font-size:1.5rem; font-weight:600; margin-bottom:4px;}
.about-intro-text .role{font-family:var(--font-mono); font-size:13px; color:var(--accent-2); margin-bottom:14px;}
.about-intro-text p{color:var(--text-muted); font-size:15px; max-width:560px; margin:0;}

.about-copy p{color:var(--text-muted); margin-bottom:18px; font-size:1.02rem;}
.philosophy{display:grid; gap:14px; margin-top:8px;}
.philosophy-item{
  display:flex; gap:14px; align-items:flex-start; padding:16px; border:1px solid var(--border); border-radius:12px;
  background:var(--surface); transition:border-color 0.2s ease, transform 0.2s ease;
}
.philosophy-item:hover{border-color:var(--border-hi); transform:translateX(4px);}
.philosophy-item .idx{font-family:var(--font-mono); color:var(--accent-2); font-size:13px; margin-top:2px;}
.philosophy-item h4{font-size:15px; margin-bottom:4px;}
.philosophy-item p{color:var(--text-muted); font-size:14px; margin:0;}
.stack-pills{display:flex; flex-wrap:wrap; gap:10px; margin-top:28px;}
.pill{
  font-family:var(--font-mono); font-size:12.5px; padding:7px 13px; border-radius:100px;
  background:var(--surface); border:1px solid var(--border); color:var(--text-muted);
  transition:all 0.2s ease;
}
.pill:hover{border-color:var(--accent); color:var(--text);}

/* services */
.services-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
@media (max-width:960px){.services-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){.services-grid{grid-template-columns:1fr;}}
.card{
  background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:28px;
  transition:transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position:relative; overflow:hidden;
}
.card::before{
  content:""; position:absolute; inset:0; opacity:0; transition:opacity 0.3s ease;
  background:radial-gradient(400px circle at 50% 0%, rgba(91,141,239,0.10), transparent 60%);
}
.card:hover{transform:translateY(-5px); border-color:var(--border-hi);}
.card:hover::before{opacity:1;}
.card-icon{
  width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:rgba(91,141,239,0.12); color:var(--accent); margin-bottom:18px;
}
.card h3{font-size:1.08rem; margin-bottom:10px;}
.card p.desc{color:var(--text-muted); font-size:14.5px; margin-bottom:14px;}
.card ul.benefits{display:grid; gap:7px; margin-bottom:18px;}
.card ul.benefits li{font-size:13.5px; color:var(--text-muted); display:flex; gap:8px;}
.card ul.benefits li::before{content:"›"; color:var(--accent-2);}
.card-cta{font-family:var(--font-mono); font-size:12.5px; color:var(--accent-2); display:inline-flex; gap:6px; align-items:center;}
.card-cta::after{content:"→"; transition:transform 0.2s ease;}
.card:hover .card-cta::after{transform:translateX(4px);}

/* technologies */
.tech-groups{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
@media (max-width:960px){.tech-groups{grid-template-columns:repeat(2,1fr);}}
@media (max-width:560px){.tech-groups{grid-template-columns:1fr;}}
.tech-card{background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:22px;}
.tech-card h4{font-family:var(--font-mono); font-size:12.5px; color:var(--accent-2); margin-bottom:14px; text-transform:uppercase; letter-spacing:0.05em;}
.tech-card ul{display:grid; gap:9px;}
.tech-card li{font-size:14px; color:var(--text-muted); display:flex; align-items:center; gap:9px;}
.tech-card li::before{content:""; width:5px; height:5px; border-radius:50%; background:var(--accent); flex-shrink:0;}

/* projects */
.project{
  display:grid; grid-template-columns:0.9fr 1.1fr; gap:44px; align-items:center;
  padding:44px 0; border-top:1px solid var(--border);
}
.project:last-child{border-bottom:1px solid var(--border);}
@media (max-width:860px){.project{grid-template-columns:1fr; gap:24px;}}
.project-tag{font-family:var(--font-mono); font-size:12px; color:var(--text-dim); margin-bottom:10px; display:block;}
.project h3{font-size:1.5rem; margin-bottom:14px;}
.project-body{display:grid; gap:12px; margin-bottom:16px;}
.project-row{font-size:14.5px; color:var(--text-muted);}
.project-row b{color:var(--text); font-weight:500;}
.project-tech{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px;}
.impact-box{
  background:linear-gradient(135deg, rgba(91,141,239,0.08), rgba(34,211,238,0.05));
  border:1px solid rgba(91,141,239,0.2); border-radius:12px; padding:18px 20px;
}
.impact-box .label{font-family:var(--font-mono); font-size:11.5px; color:var(--accent-2); margin-bottom:6px;}
.impact-box p{font-size:14.5px; color:var(--text); margin:0;}
.project-visual{
  aspect-ratio:16/11; border-radius:16px; background:var(--surface); border:1px solid var(--border);
  position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center;
}
.project-visual svg{width:78%; height:78%; opacity:0.9;}

/* experience */
.timeline{position:relative; padding-left:32px;}
.timeline::before{content:""; position:absolute; left:6px; top:6px; bottom:6px; width:1.5px; background:linear-gradient(180deg, var(--accent-3), transparent);}
.tl-item{position:relative; padding-bottom:44px;}
.tl-item:last-child{padding-bottom:0;}
.tl-item::before{
  content:""; position:absolute; left:-32px; top:4px; width:12px; height:12px; border-radius:50%;
  background:var(--bg); border:2px solid var(--accent-2); box-shadow:0 0 0 4px var(--bg);
}
.tl-date{font-family:var(--font-mono); font-size:12.5px; color:var(--accent-2); margin-bottom:6px; display:block;}
.tl-item h4{font-size:1.15rem; margin-bottom:8px;}
.tl-item p{color:var(--text-muted); font-size:14.5px; max-width:640px;}
.achv-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-top:52px; padding-top:44px; border-top:1px solid var(--border);}
@media (max-width:760px){.achv-grid{grid-template-columns:repeat(2,1fr);}}
.achv-card{text-align:center; padding:22px 14px; border:1px solid var(--border); border-radius:14px; background:var(--surface);}
.achv-card .stat{font-family:var(--font-display); font-size:1.7rem; font-weight:700; color:var(--accent-2);}
.achv-card .label{font-size:12.5px; color:var(--text-muted); margin-top:8px; line-height:1.4;}

/* testimonials */
.testi-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
@media (max-width:900px){.testi-grid{grid-template-columns:1fr;}}
.testi-card{background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:26px;}
.testi-card .quote{font-size:14.5px; color:var(--text); margin-bottom:20px; line-height:1.7;}
.testi-who{display:flex; align-items:center; gap:12px;}
.testi-avatar{width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,var(--accent-3),var(--accent-2)); flex-shrink:0;}
.testi-name{font-size:14px; font-weight:500;}
.testi-role{font-size:12.5px; color:var(--text-muted);}

/* contact */
.contact-wrap{display:grid; grid-template-columns:0.85fr 1.15fr; gap:56px;}
@media (max-width:900px){.contact-wrap{grid-template-columns:1fr;}}
.contact-info h2{font-size:2rem; margin-bottom:16px;}
.contact-info > p{color:var(--text-muted); margin-bottom:32px;}
.contact-channels{display:grid; gap:14px;}
.channel{display:flex; align-items:center; gap:14px; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); transition:border-color 0.2s ease;}
.channel:hover{border-color:var(--border-hi);}
.channel-icon{width:38px; height:38px; border-radius:9px; background:rgba(91,141,239,0.12); display:flex; align-items:center; justify-content:center; color:var(--accent); flex-shrink:0;}
.channel .label{font-size:12px; color:var(--text-dim); font-family:var(--font-mono);}
.channel .value{font-size:14.5px;}

.form-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:36px;}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px;}
@media (max-width:560px){.form-row{grid-template-columns:1fr;}}
.field{display:flex; flex-direction:column; gap:7px;}
.field label{font-size:12.5px; color:var(--text-muted); font-family:var(--font-mono);}
.field input, .field select, .field textarea{
  background:var(--bg-alt); border:1px solid var(--border); border-radius:9px; padding:11px 13px;
  color:var(--text); font-family:var(--font-body); font-size:14.5px; transition:border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{outline:none; border-color:var(--accent);}
.field textarea{resize:vertical; min-height:100px;}
.form-actions{display:flex; gap:12px; margin-top:8px; flex-wrap:wrap;}
.form-note{font-size:12.5px; color:var(--text-dim); margin-top:14px;}

/* footer */
footer{border-top:1px solid var(--border); padding:56px 0 32px;}
.footer-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; margin-bottom:44px;}
@media (max-width:760px){.footer-grid{grid-template-columns:repeat(2,1fr);}}
.footer-grid h5{font-size:12.5px; font-family:var(--font-mono); color:var(--text-dim); margin-bottom:16px; text-transform:uppercase; letter-spacing:0.05em;}
.footer-grid ul{display:grid; gap:10px;}
.footer-grid a{font-size:14px; color:var(--text-muted); transition:color 0.2s ease;}
.footer-grid a:hover{color:var(--text);}
.footer-bottom{display:flex; justify-content:space-between; align-items:center; padding-top:28px; border-top:1px solid var(--border); flex-wrap:wrap; gap:16px;}
.footer-bottom p{font-size:13px; color:var(--text-dim);}
.social-row{display:flex; gap:14px;}
.social-row a{width:36px; height:36px; border-radius:9px; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text-muted); transition:all 0.2s ease;}
.social-row a:hover{border-color:var(--accent); color:var(--accent);}

/* back to top */
#back-to-top{
  position:fixed; bottom:28px; right:28px; width:46px; height:46px; border-radius:50%;
  background:var(--surface-hi); border:1px solid var(--border-hi); color:var(--text);
  display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:800;
  opacity:0; pointer-events:none; transform:translateY(10px); transition:all 0.3s ease;
}
#back-to-top.visible{opacity:1; pointer-events:auto; transform:translateY(0);}
#back-to-top:hover{border-color:var(--accent); color:var(--accent);}

/* reveal */
.reveal{opacity:0; transform:translateY(24px); transition:opacity 0.7s ease, transform 0.7s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* command palette */
#cmdk-overlay{
  position:fixed; inset:0; background:rgba(6,8,12,0.7); backdrop-filter:blur(4px);
  z-index:1100; display:none; align-items:flex-start; justify-content:center; padding-top:14vh;
}
#cmdk-overlay.open{display:flex;}
#cmdk{width:100%; max-width:560px; background:var(--surface-hi); border:1px solid var(--border-hi); border-radius:14px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,0.5);}
#cmdk input{width:100%; background:transparent; border:none; border-bottom:1px solid var(--border); padding:16px 18px; color:var(--text); font-size:15px; font-family:var(--font-mono);}
#cmdk input:focus{outline:none;}
#cmdk-list{max-height:320px; overflow-y:auto;}
#cmdk-list a{display:flex; justify-content:space-between; padding:13px 18px; font-size:14px; color:var(--text-muted); border-bottom:1px solid var(--border);}
#cmdk-list a:hover, #cmdk-list a.active{background:rgba(91,141,239,0.1); color:var(--text);}
#cmdk-list span.k{font-family:var(--font-mono); font-size:11px; color:var(--text-dim);}
.cmdk-hint{font-family:var(--font-mono); font-size:11px; color:var(--text-dim); border:1px solid var(--border); border-radius:6px; padding:2px 7px;}
