:root{
  --bg: #0b0c10;
  --fg: #f6f7fb;
  --muted: rgba(246,247,251,.72);
  --glass: rgba(15, 16, 20, .55);
  --stroke: rgba(255,255,255,.14);
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --max: 1120px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

/* Header */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.15));
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.brand{
  text-decoration: none;
  color: var(--fg);
  display: grid;
  line-height: 1;
  gap: 2px;
}
.brand-mark{
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
}
.brand-sub{
  font-size: 12px;
  color: var(--muted);
}

.nav-desktop{
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-desktop a{
  text-decoration: none;
  color: var(--fg);
  opacity: .88;
  font-size: 13px;
  letter-spacing: .01em;
}
.nav-desktop a:hover{ opacity: 1; }

.pill{
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

/* Mobile menu */
.nav-toggle{
  display: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.nav-toggle span{
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--fg);
  opacity: .9;
}

.nav-drawer{
  position: fixed;
  top: 0; right: 0;
  width: min(360px, 92vw);
  height: 100%;
  transform: translateX(110%);
  transition: transform .25s ease;
  z-index: 80;
  background: rgba(10,10,12,.86);
  border-left: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  padding: 18px;
}
.nav-drawer.open{ transform: translateX(0); }

.drawer-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.drawer-title{ color: var(--muted); font-size: 13px; }

.drawer-close{
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--fg);
  font-size: 18px;
}

.nav-mobile{
  display: grid;
  gap: 10px;
}
.nav-mobile a{
  text-decoration: none;
  color: var(--fg);
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
.nav-mobile a.pill{
  border-radius: 14px;
  background: rgba(255,255,255,.10);
}

/* Tesla-like scroll */
.snap{
  scroll-snap-type: y mandatory;
}
.panel{
  min-height: 100vh;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  padding: 110px 18px 60px;
  position: relative;
  overflow: hidden;
}

/* Background layers */
.panel::before{
content:"";
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
background-size:cover;
background-position:center;
background-attachment:fixed;
z-index:-1;
}
.panel::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.35) 45%, rgba(0,0,0,.70));
  pointer-events: none;
}

/* Section background images (put real images in /assets) */
.panel[data-bg="hero"]::before{
  background: url("assets/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.panel[data-bg="smart"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/smart.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="rewire"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/rewire.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="lighting"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/lighting.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="security"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/security.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="ev"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/ev.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="projects"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/projects.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="about"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/about.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat;}
.panel[data-bg="contact"]::before{ background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,.00) 55%), url("assets/contact.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat; }

/* Glass card */
.panel-content{
  position: relative;
  z-index: 2;
  width: min(var(--max), 100%);
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 28px;
}

.hero .panel-content{ padding: 46px 34px; }

.kicker{
  color: var(--muted);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 12px;
}

h1{
  margin: 0 0 12px;
  font-size: clamp(34px, 4.2vw, 56px);
  letter-spacing: -0.03em;
}

h2{
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.02em;
}

h3{ margin: 0 0 8px; font-size: 18px; }

.lead{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 72ch;
}

.feature-list{
  margin: 0 0 22px;
  padding-left: 18px;
  color: rgba(246,247,251,.84);
  line-height: 1.7;
}

.cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta.small{ margin-top: 12px; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,.16);
  transition: transform .08s ease, background .18s ease;
  user-select: none;
}
.btn:hover{
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.btn.primary{
  background: rgba(255,255,255,.92);
  color: #0b0c10;
}
.btn.ghost{
  background: rgba(255,255,255,.06);
  color: var(--fg);
}

.micro{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: rgba(246,247,251,.78);
  font-size: 13px;
}

.scroll-hint{
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3;
  text-decoration: none;
  color: rgba(246,247,251,.75);
  font-size: 24px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
}

/* Projects */
.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 12px;
  margin-bottom: 18px;
}
.card{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  padding: 16px;
}
.card p{
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}
.tag{
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(246,247,251,.86);
  font-size: 12px;
}
.panel[data-bg="hero"]::before{
  background: url("assets/hero.jpg");
  background-size: 95%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Steps */
.steps{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.step{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  padding: 16px;
}
.step-num{
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #0b0c10;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Contact */
.contact-grid{
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 14px;
  margin-top: 12px;
}
.form{ display: grid; gap: 10px; }
label{
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(246,247,251,.86);
}
input, textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.24);
  color: var(--fg);
  outline: none;
}
input:focus, textarea:focus{ border-color: rgba(255,255,255,.32); }

.form-note{
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.contact-card{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  padding: 16px;
}
.fine{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Footer */
.footer{
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 14px;
}
.footer-links{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.footer-links a{
  color: rgba(246,247,251,.86);
  text-decoration: none;
  font-size: 13px;
}
.footer-links a:hover{ text-decoration: underline; }

.projects-grid{
  margin-top: 18px;
}

.project-card{
  padding: 14px;
  overflow: hidden;
}

.project-card img{
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
}

.project-card h3{
  margin: 0 0 8px;
  font-size: 18px;
}

.project-card p{
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.project-card:hover{
  transform: translateY(-3px);
  transition: transform .18s ease;
}

.project-card img{
  transition: transform .25s ease;
}

.project-card:hover img{
  transform: scale(1.03);
}

.project-link{
  display: block;
  color: inherit;
  text-decoration: none;
}

.projects-grid{
  margin-top: 18px;
}

.project-card{
  padding: 14px;
  overflow: hidden;
}


.project-card img{
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
  transition: transform .25s ease;
}

.project-card:hover{
  transform: translateY(-3px);
  transition: transform .18s ease;
}

.project-card:hover img{
  transform: scale(1.03);
}

.project-page{
  min-height: 100vh;
  padding: 140px 18px 60px;
  background: #0b0c10;
  color: #f6f7fb;
}

.project-page-wrap{
  width: min(1120px, 100%);
  margin: 0 auto;
}

.project-page-gallery{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.project-page-gallery img{
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
}

.project-page .panel-content{
  background: rgba(15,16,20,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 30px 24px;
}

@media (max-width: 760px){
  .project-page-gallery{
    grid-template-columns: 1fr;
  }

  .project-page-gallery img{
    height: 240px;
  }
}

/* Responsive */
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr 1fr; }
  .steps{ grid-template-columns: 1fr 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .nav-desktop{ display: none; }
  .nav-toggle{ display: inline-block; }
  .panel-content{ padding: 26px 18px; }
  .hero .panel-content{ padding: 34px 22px; }
  .grid{ grid-template-columns: 1fr; }
}
/* Lightbox */

.project-page-gallery img{
  cursor: pointer;
}

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 9999;
}

.lightbox.open{
  display: flex;
}

.lightbox-image{
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.lightbox-close{
  position: absolute;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.lightbox-close:hover{
  background: rgba(255,255,255,.22);
}

.lightbox-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-arrow:hover{
  background: rgba(255,255,255,.22);
}

.lightbox-prev{
  left: 24px;
}

.lightbox-next{
  right: 24px;
}

@media (max-width: 760px){
  .lightbox-arrow{
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .lightbox-prev{
    left: 12px;
  }

  .lightbox-next{
    right: 12px;
  }
}