@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600;700&display=swap");

/* ========================
   Tokens
   ======================== */
:root{
  --ink-900:#111827;
  --ink-700:#374151;
  --muted-500:#6B7280;
  --border-200:#E5E7EB;
  --surface:#FFFFFF;
  --subsurface:#F6F8FB;
  --accent-600:#2563EB;
  --accent-700:#1D4ED8;

  --shadow-card:0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-card-hover:0 12px 32px rgba(17, 24, 39, 0.10);
}

/* ========================
   Base
   ======================== */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:var(--surface);
  color:var(--ink-900);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:24px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

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

.container{
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}

*:focus-visible{
  outline:2px solid var(--accent-600);
  outline-offset:2px;
  border-radius:8px;
}

/* ========================
   Typography
   ======================== */
h1{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:44px;
  line-height:56px;
  letter-spacing:-0.02em;
  margin:0;
}
h2{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:32px;
  line-height:40px;
  letter-spacing:-0.01em;
  margin:0;
}
h3{
  font-family:"Manrope",sans-serif;
  font-weight:600;
  font-size:18px;
  line-height:26px;
  margin:0;
}

@media (max-width:1024px){
  h1{ font-size:36px; line-height:44px; }
  h2{ font-size:28px; line-height:36px; }
}
@media (max-width:430px){
  h1{ font-size:30px; line-height:40px; }
  h2{ font-size:24px; line-height:32px; }
}

/* ========================
   Header/Navbar (same as home)
   ======================== */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--surface);
  border-bottom:1px solid var(--border-200);
}
.header-inner{
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.site-brand{
  display:flex;
  align-items:center;
  gap:16px;
  transition:opacity .15s ease;
}
.site-brand:hover{ opacity:.85; }
.brand-text{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:18px;
  line-height:24px;
  color:var(--ink-900);
}
.site-nav{
  display:flex;
  align-items:center;
  gap:22px;
}
.nav-link{
  position:relative;
  padding:8px 0;
  font-size:16px;
  font-weight:500;
  line-height:24px;
  letter-spacing:0.2px;
  color:#0B1220;
}
.nav-link::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:2px;
  width:24px;
  height:2px;
  background:transparent;
  border-radius:999px;
  transition:background .15s ease;
}
.nav-link:hover::after{ background:rgba(26,76,224,0.30); }
.nav-link.is-active{ color:#1A4CE0; }
.nav-link.is-active::after{ background:#1A4CE0; }

.btn.btn-header{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 20px;
  border-radius:12px;
  font-size:16px;
  font-weight:500;
  line-height:24px;
  background:#1A4CE0;
  color:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  white-space:nowrap;
}
.btn.btn-header:hover{ background:#1742C7; }

.nav-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:10px;
  border-radius:10px;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:var(--ink-900);
  margin:5px 0;
  border-radius:2px;
}

/* Mobile Drawer */
.mobile-nav{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,0.35);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:99;
}
.mobile-nav.open{ opacity:1; pointer-events:auto; }
.mobile-panel{
  position:absolute;
  top:0;
  right:0;
  height:100%;
  width:min(360px, 90vw);
  background:var(--surface);
  border-left:1px solid var(--border-200);
  padding:18px;
  transform:translateX(100%);
  transition:transform .18s ease;
}
.mobile-nav.open .mobile-panel{ transform:translateX(0); }
.mobile-links{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
.m-link{
  display:block;
  padding:12px 14px;
  border-radius:12px;
  font-weight:500;
  color:var(--ink-700);
}
.m-link:hover{ background:var(--subsurface); }
.m-link.is-active{ background:var(--subsurface); color:var(--accent-600); }
.btn.btn-mobile{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  height:48px;
  border-radius:12px;
  background:var(--accent-600);
  color:#fff;
  font-weight:600;
}
@media (max-width:1020px){
  .site-nav, .btn.btn-header{ display:none; }
  .nav-toggle{ display:block; }
}

/* ========================
   Page Hero
   ======================== */
.page-hero{
  background:var(--subsurface);
  border-bottom:1px solid var(--border-200);
  padding:48px 0 34px;
  text-align:center;
}
.page-hero p{
  margin:12px auto 0;
  max-width:920px;
  color:var(--ink-700);
}
.page-hero strong{ font-weight:600; }

/* ========================
   Main
   ======================== */
.portfolio-main{
  background:var(--surface);
}

/* Engineering Focus */
.focus{
  padding:44px 0 12px;
}
.focus-title{
  text-align:center;
  margin:0 0 10px;
}
.focus-text{
  max-width:980px;
  margin:0 auto;
  text-align:center;
  color:var(--ink-700);
}

/* Filters */
.filters{
  padding:20px 0 10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
}

.filter-btn{
  height:34px;
  padding:0 14px;
  border-radius:999px;
  background:var(--subsurface);
  border:1px solid var(--border-200);
  color:var(--ink-700);
  font-size:14px;
  line-height:20px;
  font-weight:600;
  cursor:pointer;
}
.filter-btn:hover{ border-color:#cbd5e1; }

.filter-btn.is-active{
  background:rgba(37,99,235,0.12);
  border-color:rgba(37,99,235,0.30);
  color:var(--accent-600);
}

/* No results */
.no-results{
  text-align:center;
  color:var(--muted-500);
  padding:16px 0;
}

/* Grid */
.grid-wrap{
  padding:18px 0 56px;
}

.case-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
}

/* Card */
.case-card{
  border:1px solid var(--border-200);
  border-radius:18px;
  background:var(--surface);
  box-shadow:var(--shadow-card);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:box-shadow .18s ease, transform .18s ease;
}
.case-card:hover{
  box-shadow:var(--shadow-card-hover);
  transform:translateY(-2px);
}

.cs-thumb{
  background:var(--subsurface);
  border-bottom:1px solid var(--border-200);
  height:180px;
  overflow:hidden;
}
.cs-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.cs-body{
  padding:14px 14px 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:220px;
}

.cs-body p{
  margin:0;
  color:var(--ink-700);
  font-size:14px;
  line-height:20px;
}

/* Tags */
.cs-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.cs-tag{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:var(--subsurface);
  border:1px solid var(--border-200);
  color:var(--ink-700);
  font-size:12px;
  line-height:16px;
  font-weight:700;
}

/* Link */
.cs-link{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--accent-600);
  font-weight:700;
  font-size:14px;
  line-height:20px;
  padding-top:6px;
}
.cs-link:hover{ text-decoration:underline; }

.arr{ margin-left:2px; }

/* Sticky CTA */
.sticky-cta{
  position:fixed;
  bottom:18px;
  right:18px;
  z-index:60;
  height:44px;
  padding:0 18px;
  border-radius:12px;
  background:var(--accent-600);
  color:#fff;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 20px rgba(17,24,39,0.16);
}
.sticky-cta:hover{ background:var(--accent-700); }

@media (max-width:1024px){
  .case-grid{ grid-template-columns:1fr; }
  .cs-body{ min-height:auto; }
  .sticky-cta{ left:18px; right:18px; }
}

/* CTA bottom */
.cta-section{
  padding:44px 0 72px;
  background:var(--subsurface);
  border-top:1px solid var(--border-200);
}
.cta-container{
  max-width:720px;
  margin:0 auto;
  text-align:center;
  padding:0 24px;
}
.cta-title{ margin:0; }
.cta-subtitle{
  margin:10px auto 18px;
  color:var(--ink-700);
  font-size:16px;
  line-height:24px;
}
.cta-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 20px;
  border-radius:12px;
  background:var(--accent-600);
  color:#fff;
  font-size:16px;
  line-height:24px;
  font-weight:600;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}
.cta-button:hover{ background:var(--accent-700); }

/* Footer */
.site-footer{
  background:var(--surface);
  border-top:1px solid var(--border-200);
  padding:56px 24px 28px;
  color:var(--ink-700);
}
.footer-inner{
  max-width:1200px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr;
  gap:44px;
}
.footer-brand .brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  color:var(--ink-900);
  font-family:"Manrope",sans-serif;
  font-weight:700;
}
.footer-brand p{ margin:0; font-size:14px; line-height:20px; }
.footer-nav h4,
.footer-contact h4{
  margin:0 0 12px;
  color:var(--ink-900);
  font-family:"Manrope",sans-serif;
  font-weight:600;
}
.footer-nav a{
  display:block;
  margin:8px 0;
  color:var(--ink-700);
  font-size:14px;
  line-height:20px;
}
.footer-nav a:hover{ color:var(--ink-900); }
.footer-contact .email-link{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--ink-700);
}
.footer-contact img{ width:18px; height:18px; }
.socials{ display:flex; gap:12px; margin-top:12px; }
.socials img{ width:18px; height:18px; opacity:0.9; }
.footer-bottom{
  margin-top:28px;
  text-align:center;
  font-size:14px;
  line-height:20px;
  color:var(--muted-500);
}
@media (max-width:1024px){
  .footer-inner{ grid-template-columns:1fr; gap:22px; }
}

/* Visited hotfix */
a.btn.btn-header:visited,
a.btn.btn-mobile:visited,
a.sticky-cta:visited,
a.cta-button:visited{
  color:#fff;
}