:root{
  --bg:#050505;
  --panel:#0A0A0A;
  --textSolid:#FAFAFA;
  --muted:rgba(250,250,250,.72);
  --border:rgba(255,255,255,.10);
  --shadow: 0 10px 28px rgba(0,0,0,.35);
  --radius:14px;
  --g-td: linear-gradient(180deg, #FF0E7A 0%, #FE4EFE 36%, #5287E7 68%, #01FAF8 100%);
  --g-lr: linear-gradient(90deg, #FF0E7A 0%, #FE4EFE 36%, #5287E7 68%, #01FAF8 100%);
  --side: clamp(16px, 20vw, 280px); /* ~20% margin each side on wide screens */
  --nav-h: 96px; /* +20% */
  --focus: 0 0 0 3px rgba(1,250,248,.35);
  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.45;
  color: var(--textSolid);
}

/* Default: all text uses top->down gradient */
.gradient-all,
.gradient-all *{
  color: transparent;
  background-image: var(--g-td);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Background still needs to be dark; use a fixed pseudo-layer */
body::before{
  content:"";
  position:fixed;
  inset:0;
  background: var(--bg);
  z-index:-1;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }
img{ max-width:100%; display:block; }

.site{
  min-height:100%;
  padding: 0 var(--side);
}

.container{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

.text-solid{
  color: var(--textSolid);
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

.muted{ opacity: .78; }

.spacer-gradient{
  height: 8px;
  width: 100%;
  background: var(--g-lr);
  border-radius: 999px;
  margin: 60px 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.30);
}

/* First divider (right after the 100vh intro) should be tight */
.intro-full + .spacer-gradient{
  margin-top: 0;
}

/* Navbar */
.navbar{
  height: var(--nav-h);
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 50;
  font-size: .98rem;
  transform: translateY(0);
  transition: transform 0s;
}
.navbar.navbar--hidden{
  transform: translateY(-100%);
}

/* Override global gradient text inside navbar (white by default) */
.navbar{ color: var(--textSolid); }
.navbar *{ color: inherit; }

.navbar .site{
  min-height: 0;
  height: 100%;
  display:flex;
  align-items:center;
}

.navbar .container{
  height: 100%;
}

.nav-inner{
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 180px;
}
.brand img{
  width: calc(var(--nav-h) * 0.8);
  height: calc(var(--nav-h) * 0.8);
  object-fit: contain;
}
.brand:hover{
  text-decoration: none;
}

.nav-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 18px;
}

.navbar .nav-link{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 10px;
  text-decoration: none;
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
.navbar .nav-link:hover{
  background: transparent;
  text-decoration:none;
  color: transparent;
  background-image: var(--g-td);
  -webkit-background-clip: text;
  background-clip: text;
}

.dropdown-toggle i{
  font-size: .82em;
}

/* Dropdown: gradient-on-hover, no hover "boxes" */
.dropdown .nav-link:hover{
  background: transparent;
}
.navbar .dropdown-menu a{
  color: var(--textSolid);
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  transition: color .14s ease;
}
.nav-link:focus-visible{
  outline:none;
  box-shadow: var(--focus);
}

.dropdown{
  position: relative;
}
.dropdown-toggle{
  cursor:pointer;
}
.dropdown-menu{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  min-width: 190px;
  background: rgba(10,10,10,.98);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
  display:none;
}

.dropdown-menu a{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
}
.dropdown-menu a:hover{
  background: transparent;
  text-decoration:none;
  color: transparent;
  background-image: var(--g-td);
  -webkit-background-clip: text;
  background-clip: text;
}
.dropdown.open .dropdown-menu{ display:block; }

/* Hero */
.hero{
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  margin-top: 18px;
  padding: 26px;
}

.hero--plain{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-top: 0;
  padding: 0;
}

.hero-title--xl{
  font-size: calc(clamp(34px, 3.4vw, 54px) * 1.3);
}

/* Force solid white (avoid any gradient/text-fill bleed) */
body.gradient-all .no-gradient,
body.gradient-all .no-gradient *{
  color: var(--textSolid) !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: var(--textSolid) !important;
}

.hero-title--xl,
.hero-title--xl *{
  color: var(--textSolid) !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: var(--textSolid) !important;
}
body.gradient-all .intro-hero h1,
body.gradient-all .intro-hero h1 *{
  color: var(--textSolid) !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: var(--textSolid) !important;
}
.intro-hero h1::before,
.intro-hero h1::after{
  content: none !important;
}

.intro-full{
  min-height: calc(100vh - var(--nav-h));
  padding: 22px 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
}

.intro-hero{
  flex: 1;
  display: flex;
  align-items: center; /* vertically center between navbar and bottom boxes */
  min-height: 0;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items:center;
}

.hero h1{
  font-size: clamp(34px, 3.4vw, 54px);
  line-height: 1.02;
  margin: 0 0 14px 0;
}
.hero .sub{
  margin: 0 0 18px 0;
  color: rgba(250,250,250,.85);
}

.hero-logo{
  justify-self:end;
  width: min(380px, 100%);
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.55));
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 14px;
  position: relative;
  border: 0;
  background: rgba(255,255,255,.06);
  color: var(--textSolid); /* white icon + text */
  -webkit-text-fill-color: var(--textSolid);
  font-weight: 750;
  text-decoration:none;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
.btn::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  padding: 1px;
  background: var(--textSolid);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}
.btn .btn-text{ color: inherit; }
.btn i{
  color: inherit;
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
.btn i::before{
  color: inherit;
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
}
.btn:hover{
  background: rgba(255,255,255,.10);
  text-decoration:none;
}
.btn:hover::before{
  background: var(--g-lr);
}
.btn:hover .btn-text,
.btn:hover i{
  color: transparent;
  background-image: var(--g-td);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn:hover i::before{
  color: transparent;
  background-image: var(--g-td) !important;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.btn:focus-visible{ outline:none; box-shadow: var(--focus); }

/* Feature cards */
.cards{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Add extra breathing room below the welcome hero */
.intro-full .cards{
  margin-top: auto;
  padding-top: 26px;
}

/* Intro quick-action cards: icon left, text right, description white */
.intro-full .cards .card{
  position: relative;
  border: 0;
  background: rgba(10,10,10,.65);
  box-shadow: var(--shadow);
  color: var(--textSolid);
}
.intro-full .cards .card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--radius);
  padding: 1px;
  background: var(--textSolid);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events:none;
}
.intro-full .cards .card .card-body{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.intro-full .cards .card .card-top{
  display:flex;
  align-items:center;
  gap: 10px;
}
.intro-full .cards .card .icon{
  flex: 0 0 auto;
  height: 28px;
  width: 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 26px;
  line-height: 1;
  color: var(--textSolid);
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: var(--textSolid);
}
.intro-full .cards .card,
.intro-full .cards .card *{
  color: var(--textSolid) !important;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: var(--textSolid) !important;
}
.intro-full .cards .card:hover *{
  color: var(--textSolid) !important;
  background-image: none !important;
  -webkit-text-fill-color: var(--textSolid) !important;
}
.intro-full .cards .card .icon i{
  color: inherit;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
  width: 100%;
  height: 100%;
}
.intro-full .cards .card .icon i::before{
  color: inherit;
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor;
  line-height: 1;
}
.intro-full .cards .card h3,
.intro-full .cards .card p{
  color: var(--textSolid);
  background-image: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}
.intro-full .cards .card h3{
  margin: 0;
  font-size: 18px; /* slightly smaller than icon */
  line-height: 1;
  font-weight: 800;
}
.intro-full .cards .card .card-top h3{
  height: 28px;
  display:flex;
  align-items:center;
}
.intro-full .cards .card p{
  margin: 0;
}

.intro-full .cards .card:hover{
  background: rgba(10,10,10,.65);
  text-decoration:none;
}
.intro-full .cards .card:hover::before{
  background: var(--g-lr); /* outline only */
}

.cards--plain{
  margin-top: 0;
}

.card{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  background: rgba(10,10,10,.65);
  padding: 18px;
  box-shadow: var(--shadow);
  text-decoration:none;
}

.card--plain{
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.card--plain:hover{
  background: transparent;
}
.card:hover{
  background: rgba(10,10,10,.82);
  text-decoration:none;
}
.card:focus-visible{ outline:none; box-shadow: var(--focus); }
.card .icon{
  font-size: 22px;
  opacity: .9;
  margin-bottom: 10px;
}
.card h3{
  margin: 0 0 6px 0;
  font-size: 18px;
}
.card p{
  margin: 0;
  color: rgba(250,250,250,.78);
  overflow-wrap:anywhere;
}

/* Projects carousel */
.section-title{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 16px;
  margin: 0 0 12px 0;
}

.section-title-lined{
  display:flex;
  align-items:center;
  gap: 12px;
}
.section-title-line{
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--g-lr);
  box-shadow: 0 8px 22px rgba(0,0,0,.30);
}
.section-title h2{
  margin: 0;
  font-size: 26px;
}
.section-title .hint{
  color: rgba(250,250,250,.72);
  font-size: 14px;
}

.carousel{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(10,10,10,.65);
  box-shadow: var(--shadow);
  padding: 14px;
}
.carousel-row{
  display:flex;
  align-items:center;
  gap: 10px;
}
.carousel--auto{
  padding: 0;
}
.car-btn{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  cursor:pointer;
}
.car-btn:hover{ background: rgba(255,255,255,.10); }
.car-btn:focus-visible{ outline:none; box-shadow: var(--focus); }
.car-viewport{
  overflow:hidden;
  flex:1;
}
.carousel--auto .car-viewport{
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.carousel--auto .car-viewport:active{
  cursor: grabbing;
}
.car-track{
  display:flex;
  gap: 12px;
  transition: transform .35s ease;
  will-change: transform;
}
.carousel--auto .car-track{
  gap: 0;
}
.car-item{
  flex: 0 0 min(513px, 82vw); /* ~15% smaller */
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
  background: rgba(0,0,0,.18);
  aspect-ratio: 1 / 1; /* square crop */
}
.carousel--auto .car-item{
  border-radius: 0;
  border: 0;
}
.car-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-meta{
  padding: 12px 12px 14px;
}
.car-meta .title{
  font-weight: 800;
  margin: 0 0 4px 0;
}
.car-meta .sub{
  margin: 0;
  color: rgba(250,250,250,.72);
  font-size: 14px;
}

/* Community */
.community-head{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.community-title{
  display:flex;
  align-items:center;
  gap: 12px;
}
.community-title-line{
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--g-lr);
  box-shadow: 0 8px 22px rgba(0,0,0,.30);
}
.community-title-text{
  margin: 0;
  letter-spacing: .14em;
  font-weight: 900;
  font-size: 28px;
  text-transform: uppercase;
}
.community-sub{
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  opacity: .86;
}

.grid-2x2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

/* Footer */
footer{
  margin-top: 50px;
  padding: 22px 0 36px;
}
.footer-top{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items:start;
}
.quick-links{
  display:flex;
  flex-wrap:wrap;
  gap: 12px 18px;
}
.footer-logo{
  width: 120px;
  opacity:.92;
}
.contact-line{
  margin-top: 10px;
  color: rgba(250,250,250,.78);
  overflow-wrap:anywhere;
}
.footer-bottom{
  margin-top: 16px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 18px;
  color: rgba(250,250,250,.72);
  flex-wrap:wrap;
}
.social{
  display:flex;
  gap: 10px;
}
.social a{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.social a:hover{ background: rgba(255,255,255,.10); }
.social a:focus-visible{ outline:none; box-shadow: var(--focus); }

/* Project detail page */
.project-layout{
  margin-top: 22px;
  display:grid;
  grid-template-columns: 30% 70%;
  gap: 14px;
  align-items:start;
}
.panel{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(10,10,10,.65);
  box-shadow: var(--shadow);
  padding: 18px;
}
.kv{
  display:grid;
  gap: 10px;
}
.kv .label{
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size: 12px;
  opacity:.86;
}
.kv .value{
  font-size: 18px;
  font-weight: 800;
}
.gallery{
  display:grid;
  gap: 10px;
}
.gallery img{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  width: 100%;
  height: auto;
}

@media (max-width: 980px){
  :root{ --side: clamp(14px, 5vw, 48px); }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-logo{ justify-self:start; width: min(320px, 78%); }
  .cards{ grid-template-columns: 1fr; }
  .grid-2x2{ grid-template-columns: 1fr; }
  .project-layout{ grid-template-columns: 1fr; }
}
