:root{
  --black:#070707;
  --white:#fff;
  --red:#f04e37;
  --red-dark:#d84430;
  --max:1240px;
}

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:'Inter', sans-serif;
  background:#070707;
  color:#fff;
}

img{
  max-width:100%;
  display:block;
}

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

h1,h2,h3,h4{
  font-family:'Montserrat', sans-serif;
}

.container{
  width:min(var(--max), calc(100% - 48px));
  margin:0 auto;
}

/* NAV */
.topbar{
  background:var(--black);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.08);
  position:sticky;
  top:0;
  z-index:20;
}

.nav{
  min-height:64px;
  display:flex;
  align-items:center;
  gap:16px;
  position:relative;
}

.brand{
  display:flex;
  align-items:center;
  min-width:140px;
}

.brand-logo{
  width:180px;
  height:auto;
}

.nav-links{
  display:flex;
  gap:22px;
  margin-left:20px;
  color:rgba(255,255,255,.92);
  font-size:14px;
}

.nav-links a{
  opacity:.85;
}

.nav-links a:hover{
  opacity:1;
  text-decoration:underline;
}

.nav-links a.active{
  opacity:1;
  font-weight:700;
}

.nav-toggle{
  display:none;
  margin-left:auto;
  width:44px;
  height:40px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.25);
  color:#fff;
  border-radius:8px;
  cursor:pointer;
}

.btn{
  display:inline-block;
  padding:12px 18px;
  border-radius:3px;
  font-size:12px;
  font-weight:800;
}

.btn-header{
  margin-left:auto;
  background:var(--red);
  color:#fff;
}

.btn-header:hover{
  background:var(--red-dark);
}

/* PAGE */
.projects-page{
  background:#070707;
}

.projects-hero{
  padding:58px 0 34px;
  text-align:center;
}

.projects-hero h1{
  color:var(--red);
  font-size:42px;
  margin:0 0 10px;
  font-weight:800;
}

.projects-hero p{
  margin:0;
  color:rgba(255,255,255,.72);
  font-size:15px;
}

.projects-section{
  padding:0 0 70px;
}

.projects-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  padding:0 8px;
}

.project-card{
  position:relative;
  height:320px;
  overflow:hidden;
  background:#111;
  display:block;
}

.project-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease, filter .35s ease;
}

.project-card:hover img{
  transform:scale(1.06);
  filter:brightness(1.08);
}

.project-overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:18px;
  background:linear-gradient(
    to top,
    rgba(0,0,0,.65),
    rgba(0,0,0,.15),
    rgba(0,0,0,0)
  );
}

.project-overlay h3{
  margin:0 0 4px;
  color:#fff;
  font-size:18px;
  font-weight:800;
}

.project-overlay span{
  color:var(--red);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
}

/* RESPONSIVE */
@media (max-width:980px){
  .projects-grid{
    grid-template-columns:repeat(2, 1fr);
  }

  .project-card{
    height:260px;
  }
}

@media (max-width:640px){
  .container{
    width:min(var(--max), calc(100% - 28px));
  }

  .brand-logo{
    width:78px;
  }

  .nav-toggle{
    display:block;
  }

  .nav-links{
    display:none;
    position:absolute;
    top:56px;
    right:20px;
    background:rgba(0,0,0,.85);
    border:1px solid rgba(255,255,255,.18);
    padding:10px 12px;
    border-radius:10px;
    flex-direction:column;
    gap:10px;
    margin-left:0;
    z-index:30;
  }

  .nav-links.show{
    display:flex;
  }

  .btn-header{
    display:none;
  }

  .projects-hero{
    padding:42px 0 26px;
  }

  .projects-hero h1{
    font-size:28px;
  }

  .projects-grid{
    grid-template-columns:1fr;
    padding:0;
    gap:8px;
  }

  .project-card{
    height:260px;
  }
}