:root{
  --bg:#08090a; --panel:#0f1113; --line:rgba(255,255,255,.12); --line2:rgba(255,255,255,.06);
  --fg:#f5f5f4; --muted:#9a9a9c;
  --safe-t:env(safe-area-inset-top,0px); --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth; scroll-padding-top:80px;}
body{background:var(--bg); color:var(--fg); font-family:'Inter',sans-serif; line-height:1.55; overflow-x:hidden; padding-top:var(--safe-t); padding-bottom:var(--safe-b);}
h1,h2,h3{font-family:'Space Grotesk',sans-serif; font-weight:600; letter-spacing:-0.02em;}
.wrap{max-width:1120px; margin:0 auto; padding:0 24px;}
a{color:inherit; text-decoration:none;}
.muted{color:var(--muted);}
.arrow{display:inline-block; transition:transform .25s;}
.btn{display:inline-flex; align-items:center; gap:8px; padding:14px 24px; border:1px solid var(--line); border-radius:2px; font-size:14px; font-weight:500; transition:background .2s,border-color .2s; cursor:pointer; background:none; color:inherit; font-family:inherit;}
.btn:hover{border-color:var(--fg);}
.btn:hover .arrow{transform:translateX(4px);}
.btn.solid{background:var(--fg); color:#0a0a0a;}
.btn.solid:hover{background:#dcdcdb;}
.eyebrow{font-size:12px; color:var(--muted); font-weight:500; letter-spacing:.04em;}
section{padding:96px 0; border-bottom:1px solid var(--line2);}

/* NAV */
header{position:fixed; top:0; left:0; right:0; z-index:50; padding-top:var(--safe-t); border-bottom:1px solid transparent; transition:background .3s,border-color .3s,backdrop-filter .3s;}
header.scrolled{background:rgba(8,9,10,.82); backdrop-filter:blur(10px); border-color:var(--line2);}
nav{max-width:1120px; margin:0 auto; padding:18px 24px; display:flex; align-items:center; justify-content:space-between;}
.brand{display:flex; align-items:center; gap:10px; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:18px;}
.fan{width:26px; height:26px; object-fit:contain;}
.navlinks{display:flex; gap:32px; font-size:14px; color:var(--muted);}
.navlinks a:hover{color:var(--fg);}
.burger{display:none; flex-direction:column; gap:5px; cursor:pointer;}
.burger span{width:22px; height:1.5px; background:var(--fg);}
.mobilemenu{display:none; flex-direction:column; gap:20px; padding:24px; background:var(--bg); border-top:1px solid var(--line2);}
.mobilemenu.open{display:flex;}
@media(max-width:800px){.navlinks,.navcta.desktop{display:none;} .burger{display:flex;}}

/* HERO */
.hero{min-height:100svh; display:flex; flex-direction:column; justify-content:center; position:relative; padding-top:100px;}
#lines{position:absolute; inset:0; z-index:0; opacity:.5;}
.hero .wrap{position:relative; z-index:1;}
.herofan{width:120px; height:120px; margin-bottom:28px; opacity:.9; object-fit:contain;}
.hero h1{font-size:clamp(40px,7vw,88px); line-height:.98; margin:14px 0 22px;}
.hero p.sub{max-width:560px; font-size:18px; color:var(--muted); margin-bottom:36px;}
.herobtns{display:flex; gap:16px; flex-wrap:wrap;}

/* GRID CARDS */
.grid{display:grid; gap:1px; background:var(--line2); border:1px solid var(--line2); margin-top:48px;}
.g4{grid-template-columns:repeat(4,1fr);}
.g3{grid-template-columns:repeat(3,1fr);}
@media(max-width:900px){.g4{grid-template-columns:repeat(2,1fr);} .g3{grid-template-columns:repeat(2,1fr);}}
@media(max-width:560px){.g4,.g3{grid-template-columns:1fr;}}
.card{background:var(--bg); padding:32px 28px; transition:background .25s;}
.card:hover{background:var(--panel);}
.card .n{font-size:12px; color:var(--muted); margin-bottom:18px;}
.card h3{font-size:18px; margin-bottom:10px;}
.card p{color:var(--muted); font-size:14px;}
.icon{width:22px; height:22px; margin-bottom:18px; stroke:var(--fg); fill:none; stroke-width:1.3;}

h2.sec{font-size:clamp(28px,4vw,44px); max-width:640px;}
.secintro{max-width:640px; color:var(--muted); margin-top:16px; font-size:16px;}

/* TECH BADGES */
.techgroup{margin-top:44px;}
.techgroup h4{font-size:13px; color:var(--muted); font-weight:500; margin-bottom:14px;}
.badges{display:flex; flex-wrap:wrap; gap:10px; margin-bottom:40px;}
.badge{border:1px solid var(--line); padding:8px 16px; font-size:13px; border-radius:2px; transition:border-color .2s,background .2s;}
.badge:hover{border-color:var(--fg); background:var(--panel);}

/* PROJECTS */
.proj{border:1px solid var(--line); margin-top:24px; padding:40px; display:flex; flex-direction:column; gap:14px; transition:border-color .25s;}
.proj:hover{border-color:rgba(255,255,255,.35);}
.proj .tag{color:var(--muted); font-size:13px;}
.proj h3{font-size:24px;}
.proj p{color:var(--muted); max-width:600px;}

/* PROCESS TIMELINE */
.timeline{display:flex; gap:0; margin-top:56px; overflow-x:auto;}
.tstep{flex:1; min-width:180px; border-left:1px solid var(--line); padding:0 24px 20px;}
.tstep .n{font-size:13px; color:var(--muted); margin-bottom:10px;}
.tstep h3{font-size:16px; margin-bottom:8px;}
.tstep p{color:var(--muted); font-size:13px;}
@media(max-width:800px){.timeline{flex-direction:column;} .tstep{border-left:none; border-top:1px solid var(--line); padding:20px 0 0;}}

/* SW x HW */
.stack{display:flex; flex-direction:column; align-items:center; gap:0; margin:56px auto 0; max-width:340px;}
.snode{border:1px solid var(--line); padding:14px 28px; font-size:14px; border-radius:2px; background:var(--panel);}
.sconn{width:1px; height:32px; background:var(--line);}

/* CTA + FORM */
.cta{text-align:center; padding:120px 0;}
.cta h2{font-size:clamp(32px,6vw,64px); margin-bottom:24px;}
.contactform{display:flex; flex-direction:column; gap:14px; max-width:440px; margin:36px auto 0; text-align:left;}
.contactform input,.contactform textarea{background:var(--panel); border:1px solid var(--line); color:var(--fg); padding:12px 14px; font-family:'Inter',sans-serif; font-size:14px; border-radius:2px; resize:vertical;}
.contactform input:focus,.contactform textarea:focus{outline:none; border-color:var(--fg);}

footer{padding:56px 0 40px;}
.footgrid{display:flex; justify-content:space-between; flex-wrap:wrap; gap:32px;}
.footlinks{display:flex; gap:24px; font-size:14px; color:var(--muted);}
.footlinks a:hover{color:var(--fg);}
.footbottom{display:flex; justify-content:space-between; margin-top:44px; font-size:12px; color:var(--muted); flex-wrap:wrap; gap:10px;}

.reveal{opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:none;}
@media(prefers-reduced-motion:reduce){.reveal{opacity:1; transform:none; transition:none;} #lines{display:none;}}
