:root{
  --bg: #0B0A1F;
  --bg-alt: #100E26;
  --card: #161329;
  --card-2: #1C1836;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #F4F3FA;
  --text-muted: #ABA8C4;
  --text-dim: #726F92;
  --accent: #7C5CFC;
  --accent-hover: #9581FF;
  --accent-soft: rgba(124,92,252,0.14);
  --maxw: 1160px;
  --radius: 16px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:.001ms !important; transition-duration:.001ms !important;}
}
body{
  margin:0;
  background:var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(124,92,252,0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(124,92,252,0.10), transparent 60%);
  background-attachment:fixed;
  color:var(--text);
  font-family:var(--font);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  position:relative;
  overflow-x:hidden;
}

/* ambient drifting blobs for depth */
.ambient{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.ambient span{
  position:absolute;
  border-radius:50%;
  filter:blur(90px);
  opacity:0.16;
}
.ambient span:nth-child(1){
  width:480px; height:480px;
  top:-120px; left:-100px;
  background:var(--accent);
  animation:drift1 26s ease-in-out infinite;
}
.ambient span:nth-child(2){
  width:420px; height:420px;
  bottom:-140px; right:-80px;
  background:#5B7FFF;
  animation:drift2 32s ease-in-out infinite;
}
@keyframes drift1{
  0%,100%{transform:translate(0,0);}
  50%{transform:translate(60px,50px);}
}
@keyframes drift2{
  0%,100%{transform:translate(0,0);}
  50%{transform:translate(-50px,-40px);}
}
@media (prefers-reduced-motion: reduce){
  .ambient span{animation:none !important;}
}

/* grain texture */
body::after{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  z-index:1;
  opacity:0.025;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer, .utility-bar{position:relative; z-index:2;}

/* scroll-reveal */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.is-visible{
  opacity:1;
  transform:translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1; transform:none; transition:none;}
}
a{color:inherit; text-decoration:none;}
ul{list-style:none; margin:0; padding:0;}
h1,h2,h3,h4{margin:0;}
p{margin:0;}
::selection{background:var(--accent); color:#fff;}
:focus-visible{outline:2px solid var(--accent-hover); outline-offset:3px;}
hr{border:none; border-top:1px solid var(--border); margin:28px 0;}

/* ============ UTILITY BAR ============ */
.utility-bar{
  background:var(--bg-alt);
  border-bottom:1px solid var(--border);
}
.utility-bar__inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:10px clamp(20px,4vw,48px);
  display:flex;
  gap:28px;
  overflow-x:auto;
}
.utility-bar__inner a{
  font-size:13px;
  font-weight:600;
  color:var(--text-muted);
  white-space:nowrap;
  transition:color .2s ease;
}
.utility-bar__inner a:hover{color:var(--accent-hover);}

/* ============ NAV ============ */
.nav{
  position:sticky; top:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  max-width:var(--maxw);
  margin:0 auto;
  padding:22px clamp(20px,4vw,48px);
}
.nav__mark{font-size:19px; font-weight:800; letter-spacing:-0.01em;}
.nav__links{display:flex; gap:32px;}
.nav__links a{
  font-size:14.5px;
  font-weight:500;
  color:var(--text-muted);
  transition:color .2s ease;
}
.nav__links a:hover{color:var(--text);}
.nav__links a.is-active{color:var(--accent-hover);}
.nav__cta{
  background:var(--accent);
  color:#fff;
  font-weight:700;
  font-size:14px;
  padding:11px 22px;
  border-radius:999px;
  transition:background .2s ease, transform .2s ease;
}
.nav__cta:hover{background:var(--accent-hover); transform:translateY(-1px);}
.nav__burger{display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:6px;}
.nav__burger span{width:22px; height:2px; background:var(--text); border-radius:2px;}
.mobile-menu{display:none; flex-direction:column; background:var(--card); border-bottom:1px solid var(--border);}
.mobile-menu a{padding:16px 24px; font-size:15px; font-weight:500; color:var(--text-muted); border-bottom:1px solid var(--border);}
.mobile-menu.open{display:flex;}
@media (max-width:860px){
  .nav__links, .nav__cta{display:none;}
  .nav__burger{display:flex;}
}

/* ============ HERO ============ */
.hero{
  max-width:var(--maxw);
  margin:0 auto;
  padding:clamp(40px,6vw,72px) clamp(20px,4vw,48px) clamp(56px,8vw,96px);
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:clamp(32px,5vw,64px);
}
.pills{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:24px;}
.pill{
  font-size:12.5px;
  font-weight:700;
  letter-spacing:0.02em;
  color:var(--accent-hover);
  background:var(--accent-soft);
  border:1px solid rgba(124,92,252,0.35);
  padding:7px 16px;
  border-radius:999px;
}
.pill--outline{
  background:transparent;
  border:1px solid var(--border-strong);
  color:var(--text-muted);
}
.hero__name{
  font-size:clamp(40px,6vw,64px);
  font-weight:800;
  letter-spacing:-0.02em;
  line-height:1.05;
}
.hero__headline{
  margin-top:18px;
  font-size:clamp(19px,2.2vw,26px);
  font-weight:600;
  color:var(--text);
  line-height:1.4;
  max-width:20ch;
}
.hero__sub{
  margin-top:22px;
  color:var(--text-muted);
  font-size:16px;
  max-width:52ch;
  line-height:1.7;
}
.hero__tagline{
  margin-top:18px;
  font-weight:700;
  font-size:16px;
  color:var(--text);
}
.hero__actions{
  margin-top:36px;
  display:flex; gap:14px; flex-wrap:wrap;
}
.hero__photo{
  display:flex; justify-content:center; align-items:center;
}
.hero__photo img{
  width:100%;
  max-width:340px;
  border-radius:50%;
  display:block;
  box-shadow:0 24px 48px -20px rgba(0,0,0,0.5);
}

.btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:14px 26px;
  font-weight:700;
  font-size:14.5px;
  border-radius:999px;
  transition:all .2s ease;
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.btn--primary::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform:translateX(-100%);
  transition:transform .5s ease;
  z-index:-1;
}
.btn--primary:hover::before{ transform:translateX(100%); }
.btn--primary{background:var(--accent); color:#fff;}
.btn--primary:hover{background:var(--accent-hover); transform:translateY(-1px);}
.btn--ghost{border:1px solid var(--border-strong); color:var(--text);}
.btn--ghost:hover{border-color:var(--accent); color:var(--accent-hover);}

/* tablet: stack, keep sizes close to desktop */
@media (max-width:860px){
  .hero{grid-template-columns:1fr; text-align:center;}
  .pills{justify-content:center;}
  .hero__sub{margin-left:auto; margin-right:auto;}
  .hero__actions{justify-content:center;}
  .hero__photo{order:-1;}
  .hero__photo img{max-width:240px;}
}

/* phone: compact hero so the whole intro fits without a scroll marathon */
@media (max-width:640px){
  .hero{
    padding-top:28px;
    padding-bottom:36px;
    gap:18px;
  }
  .hero__photo img{max-width:160px;}
  .pills{gap:8px; margin-bottom:14px;}
  .pill{padding:5px 12px; font-size:11px;}
  .hero__name{font-size:30px; line-height:1.12;}
  .hero__headline{margin-top:10px; font-size:16px; max-width:26ch; margin-left:auto; margin-right:auto;}
  .hero__sub{margin-top:12px; font-size:13.5px; line-height:1.55;}
  .hero__tagline{margin-top:10px; font-size:13.5px;}
  .hero__actions{margin-top:20px; gap:8px;}
  .btn{padding:11px 18px; font-size:13px;}
}

/* ============ SECTION SHELL ============ */
.about, .projects, .builds, .background, .contact{
  max-width:var(--maxw);
  margin:0 auto;
  padding:clamp(48px,7vw,80px) clamp(20px,4vw,48px);
  border-top:1px solid var(--border);
}
.section-title{
  font-size:clamp(26px,3.2vw,36px);
  font-weight:800;
  letter-spacing:-0.01em;
}
.section-sub{
  margin-top:10px;
  color:var(--text-muted);
  font-size:15.5px;
}

/* ============ ABOUT ============ */
.about__content{
  margin-top:28px;
  max-width:760px;
}
.about__content p{
  color:var(--text-muted);
  font-size:16px;
  line-height:1.8;
  margin-bottom:18px;
}

/* ============ PROJECTS ============ */
.projects__grid--primary{
  margin-top:32px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}
.project-card{
  position:relative;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:32px;
  display:flex;
  flex-direction:column;
  transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.status-badge{
  position:absolute;
  top:24px; right:24px;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:0.06em;
  padding:5px 12px;
  border-radius:999px;
}
.status-badge--live{
  color:#7CE0A0;
  background:rgba(124,224,160,0.12);
  border:1px solid rgba(124,224,160,0.3);
}
.status-badge--build{
  color:var(--accent-hover);
  background:var(--accent-soft);
  border:1px solid rgba(124,92,252,0.3);
}
.project-card:hover{
  border-color:rgba(124,92,252,0.4);
  transform:translateY(-4px);
  box-shadow:0 20px 40px -20px rgba(124,92,252,0.35);
}
.project-card--primary{
  background:linear-gradient(160deg, var(--card-2), var(--card));
  border-color:rgba(124,92,252,0.28);
}
.project-card h3{font-size:22px; font-weight:800; margin-bottom:12px;}
.project-card p{color:var(--text-muted); font-size:15px; line-height:1.7; margin-bottom:24px; flex-grow:1;}
.project-card__actions{display:flex; gap:12px; flex-wrap:wrap;}

/* logo tiles */
.logo-tile{
  width:76px; height:76px;
  border-radius:18px;
  background:var(--card-2);
  border:1px solid var(--border-strong);
  display:flex; align-items:center; justify-content:center;
  padding:14px;
  margin-bottom:20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.logo-tile img{width:100%; height:100%; object-fit:contain;}
.logo-tile--sm{width:56px; height:56px; border-radius:14px; padding:10px; margin-bottom:16px;}
.monogram{
  width:56px; height:56px;
  border-radius:14px;
  margin-bottom:16px;
  display:flex; align-items:center; justify-content:center;
  font-weight:800;
  font-size:16px;
  letter-spacing:0.02em;
  color:var(--accent-hover);
  background:var(--accent-soft);
  border:1px solid rgba(124,92,252,0.3);
}

@media (max-width:980px){
  .projects__grid--primary{grid-template-columns:1fr;}
}

/* ============ OTHER BUILDS ============ */
.builds__grid{
  margin-top:28px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}
.build-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:26px;
  display:flex; flex-direction:column;
  transition:border-color .2s ease, transform .2s ease;
}
.build-card:hover{border-color:var(--border-strong); transform:translateY(-2px);}
.build-card h3{font-size:17px; font-weight:700; margin-bottom:10px;}
.build-card p{color:var(--text-muted); font-size:14px; line-height:1.65; flex-grow:1;}
.build-card__link{
  margin-top:18px;
  font-size:13.5px;
  font-weight:700;
  color:var(--accent-hover);
}
@media (max-width:900px){ .builds__grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:600px){ .builds__grid{grid-template-columns:1fr;} }

/* ============ BACKGROUND ============ */
.background__row{
  margin-top:28px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
.background__row h4{font-size:17px; font-weight:700; margin-bottom:6px;}
.background__row p{color:var(--text-muted); font-size:14.5px;}
.background__label{font-size:15px; font-weight:700; margin-bottom:12px;}
.background__tags{color:var(--text-muted); font-size:15px; line-height:1.8;}
.background__list li{color:var(--text-muted); font-size:15px; margin-bottom:8px; padding-left:18px; position:relative;}
.background__list li::before{content:"•"; position:absolute; left:0; color:var(--accent-hover);}
.background__closing{color:var(--text-muted); font-size:15px;}
@media (max-width:600px){ .background__row{grid-template-columns:1fr;} }

/* ============ CONTACT ============ */
.contact{text-align:center;}
.contact__title{
  margin-top:20px;
  font-size:clamp(30px,4.5vw,46px);
  font-weight:800;
}
.contact__sub{
  margin:16px auto 0;
  max-width:560px;
  color:var(--text-muted);
  font-size:16px;
}
.contact__bold{
  margin-top:20px;
  font-weight:700;
  font-size:16px;
}
.contact__actions{
  margin-top:32px;
  display:flex; justify-content:center; flex-wrap:wrap; gap:14px;
}

/* ============ FOOTER ============ */
.footer{
  text-align:center;
  padding:28px 24px 44px;
  font-size:13px;
  color:var(--text-dim);
  border-top:1px solid var(--border);
}
