:root {
  --red: #d32f2f;
  --ink: #3b4350;
  --ink-soft: #5d6673;
  --bg: #f3f4f6;
  --card: #ffffff;
  --navy: #0b1824;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  border-top: 8px solid #111;
}
.topbar .wrap {
  max-width: 1100px; margin: 0 auto; padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; color: #fff; }
.logo svg { width: 34px; height: 30px; }
.logo b { font-weight: 800; font-size: 19px; letter-spacing: .5px; line-height: 1; }
.logo small { display: block; font-size: 7px; letter-spacing: 1px; text-align: right; opacity: .7; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 13.5px; color: #d7dde4; }
.nav a { display: flex; align-items: center; gap: 6px; transition: color .2s; }
.nav a:hover, .nav a.active { color: #fff; }
.nav .caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; }
.nav .search { width: 14px; height: 14px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  min-height: 434px; padding: 140px 0 80px;
  background: #07131d;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,14,22,.85) 0%, rgba(5,14,22,.45) 60%, rgba(5,14,22,.2) 100%);
}
.hero .wrap { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: .5px; }
.eyebrow::before { content: ""; width: 40px; height: 1px; background: #fff; }
.hero h1 { font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 18px; }
.hero p { max-width: 730px; font-size: 12.5px; line-height: 1.6; color: #e6ebf0; }
.btn-cat {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px;
  padding: 11px 28px; border-radius: 30px; font-size: 14px;
  color: var(--red); background: rgba(40,40,40,.65); border: 1px solid rgba(255,255,255,.12);
  transition: background .2s;
}
.btn-cat:hover { background: rgba(60,60,60,.8); }
.btn-cat svg { width: 12px; height: 14px; fill: var(--red); }

/* ---------- Sub nav ---------- */
.subnav {
  position: sticky; top: 0; z-index: 15;
  background: #fff; border-bottom: 2px solid var(--red);
}
.subnav ul {
  list-style: none; display: flex; justify-content: center; flex-wrap: wrap;
  padding: 14px 20px;
}
.subnav li + li { border-left: 1px solid #ddd; }
.subnav a {
  display: flex; align-items: center; gap: 8px; padding: 0 13px;
  font-size: 9.5px; font-weight: 600; text-transform: uppercase; color: #333; letter-spacing: .1px;
}
.subnav a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #999; transition: background .2s; }
.subnav a.active { color: var(--red); }
.subnav a.active::before { background: var(--red); }
.subnav a:hover { color: var(--red); }

/* ---------- Project sections ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 80px 40px 60px; }
.project {
  background: var(--card); border-radius: 24px;
  padding: 40px 48px 48px 40px; margin-bottom: 64px;
  scroll-margin-top: 80px;
}
.project h2 { font-size: 36px; font-weight: 600; letter-spacing: -1px; color: #3c4451; margin-bottom: 34px; }
.project .row { display: grid; grid-template-columns: 392px 1fr; gap: 32px; align-items: start; padding-left: 8px; }
.project .media { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #0d1a26; }
.project .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project .media:hover img { transform: scale(1.03); }
.project .text p { font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 12px; }
.project .text a { color: #2563c9; }
.project .text a:hover { text-decoration: underline; }
.badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--red); background: #fdecec; border-radius: 20px; padding: 4px 12px; margin-bottom: 14px;
}
.new-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: .5px; color: #fff; background: var(--red);
  padding: 3px 8px; border-radius: 10px;
}

/* ---------- Tech & solutions list ---------- */
.list { max-width: 760px; margin: 0 auto; }
.tcard {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center;
  background: #fff; border-radius: 18px; padding: 18px; margin-bottom: 22px;
  transition: box-shadow .25s, transform .25s;
}
.tcard:hover { box-shadow: 0 10px 30px rgba(15,30,50,.08); transform: translateY(-2px); }
.tcard .thumb { aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background-size: cover; background-position: center; }
.tcard h3 { font-size: 18px; font-weight: 700; color: #2f3742; margin-bottom: 8px; }
.tcard p { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 14px; }
.tcard .more { font-size: 13px; font-weight: 600; color: #2f3742; }
.tcard .more:hover { color: var(--red); }
.tcard.highlight { outline: 2px solid var(--red); outline-offset: -2px; position: relative; }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: #9aa6b2; font-size: 12px; text-align: center; padding: 28px 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .project .row { grid-template-columns: 1fr; }
  .project .media { max-width: 420px; }
  .tcard { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar .wrap, .hero .wrap, main { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 26px; }
  .project { padding: 28px 20px; border-radius: 18px; }
  .project h2 { font-size: 28px; }
  .project .row { padding-left: 0; }
  .subnav ul { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .subnav a { white-space: nowrap; }
}
