:root{
  --bg0:#05070d;
  --bg1:#070a12;
  --ink:#e9eefc;
  --muted:#a7b0c6;

  --line:rgba(255,255,255,.10);
  --line2:rgba(255,255,255,.07);

  --blue:#6bd6ff;
  --violet:#a98bff;
  --hot:#ff69c7;

  --shadow: 0 30px 80px rgba(0,0,0,.55);
  --shadow2: 0 18px 40px rgba(0,0,0,.40);

  --radius: 18px;
  --radius2: 28px;

  --max: 1180px;
  --pad: 22px;
  --pad2: 34px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background: linear-gradient(180deg, var(--bg0), var(--bg1) 55%, #060812);
  overflow-x:hidden;
}


body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(107,214,255,.18), transparent 60%),
    radial-gradient(760px 560px at 82% 18%, rgba(169,139,255,.14), transparent 58%),
    radial-gradient(900px 700px at 50% 92%, rgba(255,105,199,.08), transparent 60%);
  transform: translateZ(0);
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.container{
  width:min(var(--max), calc(100% - 2*var(--pad)));
  margin-inline:auto;
}

/* ---------- METAL SURFACE ---------- */
.metal{
  position:relative;
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)),
    radial-gradient(120% 140% at 10% 10%, rgba(255,255,255,.08), transparent 55%),
    radial-gradient(120% 140% at 90% 0%, rgba(107,214,255,.09), transparent 60%),
    rgba(8,10,18,.55);
  box-shadow: var(--shadow2);
  overflow:hidden;
}

.metal::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    linear-gradient(110deg,
      transparent 0%,
      rgba(255,255,255,.08) 24%,
      rgba(107,214,255,.10) 33%,
      rgba(255,255,255,.06) 42%,
      transparent 60%);
  transform: translateX(-55%);
  opacity:0;
  pointer-events:none;
  filter: blur(1px);
}

.metal:hover::before,
.metal:focus-within::before{
  opacity:.85;
  animation: sheen 1.35s ease-in-out 1;
}

@keyframes sheen{
  0%   { transform: translateX(-55%); }
  100% { transform: translateX(55%); }
}

/* Chips / dots */
.chip{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line2);
  background: rgba(0,0,0,.18);
  color: var(--muted);
  font-size:.95rem;
  white-space:nowrap;
}
.dot{
  width:9px; height:9px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--blue) 40%, rgba(107,214,255,.12) 75%);
  box-shadow: 0 0 14px rgba(107,214,255,.55);
}

/* ---------- HEADER ---------- */
header{
  position:sticky;
  top:0;
  z-index:50;
  background: rgba(5,7,13,.50);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:64px;          /* <- bar height stays fixed */
  padding: 10px 0;      /* safe */
  gap:16px;
}

/* ---------- BRAND LOGO (desktop full, mobile icon) ---------- */
.brand{
  display:flex;
  align-items:center;
  height:64px;
  position:relative;
  flex:0 0 auto;
}

.logoWrap{
  position:relative;
  width:260px;
  height:64px;
  display:block;

  overflow: visible;     /* sticker can spill out */
  isolation: isolate;    /* keeps flash layer predictable */
}

/* Desktop full logo (sticker) */
.brandLogoFull{
  position:absolute;
  left:0;
  top:120%;
  transform: translateY(-56%);  /* lift = sticker */
  height:150px;                 /* your big size */
  width:auto;
  max-height:none;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.45));
  pointer-events:none;
  z-index:2;
}

/* Mobile icon */
.brandLogoIcon{
  position:absolute;
  left:0;
  top:50%;
  transform: translateY(-50%);
  width:80%;
  display:none;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
  pointer-events:none;
  z-index:2;
}

/* Swap to icon on mobile */
@media (max-width: 820px){
  .logoWrap{ width:56px; }
  .brandLogoFull{ display:none; }
  .brandLogoIcon{ display:block; }
}

@media (max-width: 420px){
  .brandLogoIcon{ height:46px; width:46px; }
}
 
/* --- Logo ignite on load (bright -> normal) --- */
.logoWrap.intro .brandLogoFull,
.logoWrap.intro .brandLogoIcon{
  animation: logoIgnite 900ms ease-out both;
  transform-origin: left center;
}

/* Bright pop then fade to normal */
@keyframes logoIgnite{
  0%{
    opacity:0;
    filter:
      brightness(2.6)
      drop-shadow(0 0 34px rgba(107,214,255,.70))
      drop-shadow(0 18px 28px rgba(0,0,0,.45));
  }
  40%{
    opacity:1;
    filter:
      brightness(2)
      drop-shadow(0 0 26px rgba(107,214,255,.55))
      drop-shadow(0 18px 28px rgba(0,0,0,.45));
  }
  100%{
    opacity:1;
    filter:
      brightness(1)
      drop-shadow(0 18px 28px rgba(0,0,0,.45));
  }
}

/* Desktop nav links */
.navlinks{
  display:flex;
  align-items:center;
  gap:18px;
  color:var(--muted);
  font-weight:700;
  font-size:.98rem;
}
.navlinks a{
  padding:10px 10px;
  border-radius:10px;
  transition: background .2s ease, color .2s ease;
}
.navlinks a:hover{
  background: rgba(255,255,255,.06);
  color:var(--ink);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--ink);
  font-weight:800;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.085); }
.btn:active{ transform: translateY(0px); }

.btn.primary{
  border-color: rgba(107,214,255,.36);
  background:
    radial-gradient(140% 180% at 20% 10%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(145deg, rgba(107,214,255,.24), rgba(42,168,255,.14) 40%, rgba(169,139,255,.12));
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 28px rgba(107,214,255,.18);
}
.btn.ghost{
  background: rgba(0,0,0,.10);
}

/* ---------- MOBILE MENU ---------- */
/* Icon button (not a brick) */
.menuBtn{
  display:none; /* enabled by media query */
  width:44px;
  height:44px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  cursor:pointer;
  position:relative;
  align-items:center;
  justify-content:center;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.menuBtn:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(107,214,255,.22);
  transform: translateY(-1px);
}
.menuBtn:active{ transform: translateY(0); }
.menuBtn.open{
  border-color: rgba(107,214,255,.35);
  box-shadow: 0 12px 30px rgba(0,0,0,.45), 0 0 20px rgba(107,214,255,.12);
}

/* Hamburger bars */
.menuIcon{
  width:20px;
  height:14px;
  position:relative;
  display:block;
}
.menuIcon::before,
.menuIcon::after,
.menuIcon span{
  content:"";
  position:absolute;
  left:0;
  width:20px;
  height:2px;
  background: rgba(233,238,252,.92);
  border-radius:2px;
  transition: transform .18s ease, top .18s ease, opacity .18s ease;
}
.menuIcon::before{ top:0; }
.menuIcon span{ top:6px; }
.menuIcon::after{ top:12px; }

.menuBtn.open .menuIcon::before{ top:6px; transform: rotate(45deg); }
.menuBtn.open .menuIcon::after{ top:6px; transform: rotate(-45deg); }
.menuBtn.open .menuIcon span{ opacity:0; }

/* Backdrop */
.menuBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 40;
}
.menuBackdrop.open{
  opacity: 1;
  pointer-events: auto;
}

/* Dropdown panel (crisp, not foggy) */
.menuPanel{
  display:block;
  max-height:0;
  overflow:hidden;
  opacity:0;
  transform: translateY(-10px); /* NO scale */
  transition: max-height .28s ease, opacity .18s ease, transform .18s ease;

  padding:0 12px;
  margin:10px 0 16px;

  border-radius: calc(var(--radius) + 6px);
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(120% 140% at 10% 10%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(120% 140% at 90% 0%, rgba(107,214,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)),
    rgba(8,10,18,.82);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);

  pointer-events:none;

  max-width:560px;
  margin-left:auto;
  margin-right:0;
}

.menuPanel.open{
  max-height:560px;
  opacity:1;
  transform: translateY(0); /* crisp */
  padding:12px;
  pointer-events:auto;
}

.menuPanel.open{
  transform: none; /* disables GPU transform fully once open */
}
.menuPanel a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px;
  border-radius:14px;
  color:var(--muted);
  font-weight:800;
  border:1px solid transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}
.menuPanel a:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color:var(--ink);
  transform: translateY(-1px);
}

/* ---------- HERO ---------- */
.heroWrap{ padding: 34px 0 0; }
.hero{
  border-radius: var(--radius2);
  padding: var(--pad2);
}
.heroGrid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items:stretch;
}

.heroIcon{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.75), rgba(255,255,255,.08) 48%, transparent 62%),
    linear-gradient(145deg, rgba(107,214,255,.22), rgba(169,139,255,.12));
  box-shadow:
    0 0 18px rgba(107,214,255,.16),
    inset 0 0 12px rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:center;
}

.kickerRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}

h1{
  margin: 8px 0 10px;
  font-size: clamp(2.0rem, 3.6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.lead{
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 58ch;
}
.heroActions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 14px;
}

.trustStrip{
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.16);
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  justify-content:center;
  color: var(--muted);
  font-weight:750;
}
.trustStrip strong{ color: var(--ink); }

/* Right hero panel */
.panel{
  padding: 18px;
  border-radius: var(--radius);
}
.panel h3{
  margin:0 0 8px;
  font-size:1.05rem;
  letter-spacing:.2px;
}
.panel p{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.55;
}
.miniList{ display:grid; gap:10px; }

.miniItem{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}


.miniIcon{
  width:76px;      /* Bigger — same footprint as old box */
  height:76px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.miniIcon img{
  width:100%;
  height:100%;
  object-fit:contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.45));
}


.miniItem{
  transition: transform .2s ease, box-shadow .2s ease;
}


.miniItem:hover img{
  transform: scale(1.05);
  filter:
    drop-shadow(0 0 18px rgba(107,214,255,.35))
    drop-shadow(0 10px 20px rgba(0,0,0,.45));
  transition: transform .2s ease, filter .2s ease;
}

.miniItem span{ color:var(--muted); font-weight:650; line-height:1.35; font-size:.95rem; }

/* ---------- SECTIONS ---------- */
section{ padding: 42px 0; }

.sectionTitle{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 18px;
}
.sectionTitle h2{
  margin:0;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}
.sectionTitle p{
  margin:0;
  color:var(--muted);
  max-width: 62ch;
  line-height: 1.5;
}

.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card{ padding: 18px; }
.card h3{ margin: 2px 0 8px; font-size: 1.08rem; }
.card p{ margin:0; color: var(--muted); line-height: 1.55; }
.card .meta{
  margin-top: 12px;
  color: rgba(233,238,252,.85);
  font-weight: 850;
  font-size:.95rem;
  display:flex;
  gap:10px;
  align-items:center;
}

/* Portfolio */
.projects{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.project{
  grid-column: span 6;
  padding: 16px;
}
.projectTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.project h3{ margin:0 0 4px; }
.project .where{ color:var(--muted); font-weight:750; font-size:.95rem; }
.thumb{
  border-radius: 16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
  aspect-ratio: 16/9;
  display:flex;
  align-items:center;
  justify-content:center;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top: 12px;
}
.tag{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  color: var(--muted);
  font-weight: 750;
  font-size:.9rem;
}
.project a.link{
  display:inline-flex;
  gap:10px;
  align-items:center;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 900;
  opacity:.95;
}
.project a.link:hover{ opacity:1; text-decoration: underline; }

/* CTA band */
.ctaBand{
  padding: 22px;
  border-radius: var(--radius2);
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:center;
  justify-content:space-between;
}
.ctaBand h2{ margin:0; font-size:1.55rem; }
.ctaBand p{ margin:6px 0 0; color:var(--muted); max-width: 58ch; }
.ctaBand .ctaActions{ display:flex; gap:12px; flex-wrap:wrap; }

/* Footer */
footer{
  padding: 40px 0 24px;
  border-top:1px solid rgba(255,255,255,.07);
  margin-top: 20px;
  color: var(--muted);
}
.footerGrid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
footer h4{ margin:0 0 10px; color: var(--ink); }
footer ul{ list-style:none; padding:0; margin:0; }
footer li{ margin: 8px 0; }
footer a{ color: var(--muted); font-weight:750; }
footer a:hover{ color: var(--ink); text-decoration: underline; }
.footerBottom{
  display:flex;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,.07);
  padding-top: 14px;
  font-size:.95rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px){
  .heroGrid{ grid-template-columns: 1fr;}
  .grid3{ grid-template-columns: 1fr;}
  .projects{ grid-template-columns: 1fr; }
  .project{ grid-column: span 12; }
  .footerGrid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px){
  .navlinks{ display:none; }
  .menuBtn{ display:flex; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .metal:hover::before,
  .metal:focus-within::before{ animation:none; opacity:.35; }
  .btn{ transition:none; }
  .logoWrap.intro{ animation:none; }
  .logoWrap.intro::after{ display:none; }
}

/* --- HARD Z-INDEX FIX: menu must be above the blurred backdrop --- */
header { position: sticky; top: 0; z-index: 70; }      /* header on top */
#menuPanel { position: relative; z-index: 80; }        /* menu panel on top of header */
#menuBtn { position: relative; z-index: 80; }          /* button too */
#menuBackdrop { z-index: 60; }                         /* backdrop UNDER the header/menu */