:root{
  --bg:#090909;
  --bg-soft:#1f1f1f;
  --panel:#151515;
  --text:#ffffff;
  --muted:#c5c5c5;
  --line:rgba(255,255,255,.08);
  --accent:#d9a15d;
  --accent-2:#f0be7f;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:"Poppins", sans-serif;
  background:var(--bg);
  color:var(--text);
}

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

.container{
  width:min(1200px, calc(100% - 40px));
  margin-inline:auto;
}

.site-header{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  z-index:10;
}

.nav-wrap{
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  font-size:2rem;
  font-weight:700;
  letter-spacing:.2px;
}

.brand-accent{
  color:rgba(217,161,93,.8);
}
 

.brand-main{
  color:#ffffff;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.nav a{
  font-size:.95rem;
  font-weight:500;
  padding:10px 16px;
  border-radius:999px;
  transition:.2s ease;
}

.nav a.active{
  border:1px solid rgba(217,161,93,.8);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(217,161,93,.15);
}

.nav a:hover{ color:var(--accent-2); }

.hero{
  position:relative;
  min-height:780px;
  background:#050505;
  overflow:hidden;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,.88) 42%, rgba(0,0,0,.62) 60%, rgba(0,0,0,.9) 100%);
  pointer-events:none;
  z-index:1;
}

.hero-grid{
  position:relative;
  z-index:2;
  min-height:780px;
  display:grid;
  grid-template-columns:1fr .92fr;
  align-items:center;
}

.hero-content{ padding-top:76px; }

.eyebrow{
  margin:0 0 18px;
  font-size:1.25rem;
  font-weight:500;
  color:#f1ece7;
}

.hero h1{
  margin:0;
  font-size:clamp(3.7rem, 8vw, 6.5rem);
  line-height:.96;
  letter-spacing:1px;
  font-weight:800;
}

.hero h2{
  margin:26px 0 32px;
  font-size:2rem;
  font-weight:400;
  color:#f2eee8;
}

.hero h2 span{
  color:var(--accent);
  font-weight:500;
}

.hero-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:140px;
  min-height:56px;
  padding:0 26px;
  background:var(--accent);
  color:#fff;
  font-weight:500;
  font-size:1rem;
  border:1px solid var(--accent);
  transition:.2s ease;
}

.btn:hover{
  background:var(--accent-2);
  border-color:var(--accent-2);
  color:#121212;
}

.btn-outline{
  background:transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.18);
}
.btn-outline:hover{
  border-color:var(--accent-2);
  color:#121212;
  background:var(--accent-2);
}

.hero-image{
  position:relative;
  height:100%;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
}

.hero-image img{
  width:min(530px, 100%);
  height:auto;
  object-fit:cover;
  filter:brightness(.28) contrast(1.1) grayscale(1);
  transform:translateY(24px);
}

.scroll-indicator{
  position:absolute;
  right:34px;
  bottom:140px;
  z-index:4;
  width:62px;
  height:62px;
  display:grid;
  place-items:center;
  font-size:1.8rem;
  color:rgba(217,161,93,.8);
  background:rgba(255,255,255,.08);
  border-radius:6px;
  transform:rotate(45deg);
  backdrop-filter:blur(4px);
}

.scroll-indicator::before{
  content:"";
  position:absolute;
  inset:0;
  border:1px solid rgba(255,255,255,.06);
  border-radius:6px;
}

.hero-wave{
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  z-index:3;
  line-height:0;
}

.hero-wave svg{
  width:100%;
  height:170px;
  display:block;
}

.about-section,
.filled-section{
  position:relative;
  background:#202020;
  padding:80px 0 90px;
}

.section-head{
  text-align:center;
  margin-bottom:52px;
}

.section-head.small{
  margin-bottom:40px;
}

.section-head h3{
  margin:0 0 12px;
  font-size:3rem;
  line-height:1;
  font-weight:700;
}

.divider{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
}

.divider span{
  display:block;
  width:70px;
  height:1px;
  background:rgba(255,255,255,.12);
}

.divider i{
  width:8px;
  height:8px;
  display:block;
  background:var(--accent);
  transform:rotate(45deg);
}

.about-grid{
  display:grid;
  grid-template-columns:.86fr 1.14fr;
  gap:54px;
  align-items:center;
}

.about-photo-stack{
  position:relative;
  min-height:620px;
}

.bg-card{
  position:absolute;
  left:16px;
  top:20px;
  width:82%;
  height:82%;
  background:var(--accent);
  border-radius:8px;
}

.photo-card{
  position:absolute;
  left:42px;
  top:58px;
  width:82%;
  background:#0f0f0f;
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 28px 60px rgba(0,0,0,.28);
}

.photo-card img{
  width:100%;
  aspect-ratio:3/4;
  object-fit:cover;
}

.about-content{
  position:relative;
  padding-right:54px;
}

.mini-title{
  margin:0 0 8px;
  color:var(--accent);
  font-size:1rem;
  font-weight:500;
}

.about-content h4{
  margin:0 0 24px;
  font-size:3rem;
  line-height:1.18;
  font-weight:600;
  max-width:780px;
}

.about-content p{
  margin:0 0 18px;
  color:var(--muted);
  line-height:1.95;
  font-size:1rem;
}

.info-box{
  margin-top:26px;
  padding:28px 30px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px 40px;
}

.info-col{
  display:grid;
  gap:18px;
}

.info-item{
  position:relative;
  padding-left:22px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  font-size:1rem;
  color:#f4f4f4;
}

.info-item::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  width:8px;
  height:8px;
  background:var(--accent);
  transform:rotate(45deg);
}

.info-item span{
  color:#d0d0d0;
  word-break:break-word;
}

.side-social{
  position:absolute;
  right:-20px;
  bottom:-10px;
  display:grid;
  gap:12px;
}

.side-social a{
  width:44px;
  height:44px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#111;
  border:1px solid rgba(255,255,255,.07);
  color:#ededed;
  font-size:1rem;
  font-weight:500;
  transition:.2s ease;
}

.side-social a:hover{
  color:var(--accent);
  border-color:rgba(217,161,93,.35);
}

.service-grid,
.project-grid,
.contact-cards{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:24px;
}

.resume-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:24px;
}

.simple-card,
.resume-card,
.contact-card{
  background:#151515;
  border:1px solid rgba(255,255,255,.08);
  padding:28px;
  min-height:210px;
}

.simple-card h4,
.resume-card h4,
.contact-card h4{
  margin:0 0 14px;
  font-size:1.35rem;
  color:#fff;
}

.simple-card p,
.resume-card p,
.contact-card p{
  margin:0;
  color:var(--muted);
  line-height:1.9;
}

.resume-card ul{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.95;
}

.contact-card{
  min-height:160px;
  transition:.2s ease;
}
.contact-card:hover{
  border-color:rgba(217,161,93,.35);
}
.contact-card p{
  word-break:break-word;
}

.contact-filled{
  padding-bottom:110px;
}

@media (max-width: 1100px){
  .hero-grid,
  .about-grid{
    grid-template-columns:1fr;
  }

  .hero{
    min-height:auto;
    padding-top:120px;
  }

  .hero-grid{
    min-height:auto;
    gap:30px;
    padding-bottom:180px;
  }

  .hero-image{
    justify-content:center;
  }

  .hero-content{ order:1; }
  .hero-image{ order:2; }

  .hero-image img{
    width:min(460px, 100%);
    transform:none;
  }

  .about-photo-stack{ min-height:560px; }

  .about-content{ padding-right:0; }

  .side-social{
    position:static;
    display:flex;
    flex-wrap:wrap;
    margin-top:24px;
  }
}

@media (max-width: 760px){
  .container{
    width:min(100% - 26px, 1200px);
  }

  .nav-wrap{
    padding:10px 0 12px;
    align-items:flex-start;
  }

  .nav{ justify-content:flex-end; }

  .hero h1{ font-size:3rem; }
  .hero h2{ font-size:1.5rem; }
  .section-head h3{ font-size:2.2rem; }
  .about-content h4{ font-size:2rem; }

  .info-box,
  .service-grid,
  .project-grid,
  .resume-grid,
  .contact-cards{
    grid-template-columns:1fr;
  }

  .about-photo-stack{ min-height:420px; }
  .bg-card{ left:8px; top:12px; }
  .photo-card{ left:24px; top:34px; }
  .scroll-indicator{ display:none; }

  .hero-buttons{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* ===============================
   Mobile organization + speed patch
   Added by Eng. Saif mobile fix
================================== */

body{
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x:hidden;
}

.hero-image img,
.photo-card img{
  will-change:auto;
}

@media (prefers-reduced-motion: reduce){
  *{
    scroll-behavior:auto !important;
    transition:none !important;
    animation:none !important;
  }
}

@media (max-width: 820px){
  html,
  body{
    width:100%;
    overflow-x:hidden;
  }

  .container{
    width:min(100% - 24px, 1200px);
  }

  .site-header{
    position:sticky;
    top:0;
    background:rgba(5,5,5,.94);
    border-bottom:1px solid rgba(255,255,255,.07);
    backdrop-filter:blur(14px);
  }

  .nav-wrap{
    min-height:auto;
    padding:12px 0;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:12px;
  }

  .brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    width:100%;
    font-size:1.45rem;
    line-height:1;
    white-space:nowrap;
    text-align:center;
  }

  .nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    justify-content:flex-start;
    gap:8px;
    padding:0 2px 4px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .nav::-webkit-scrollbar{
    display:none;
  }

  .nav a{
    flex:0 0 auto;
    font-size:.82rem;
    padding:8px 12px;
    background:rgba(255,255,255,.035);
  }

  .nav a.active{
    border-color:rgba(217,161,93,.72);
  }

  .hero{
    min-height:auto;
    padding-top:0;
  }

  .hero::before{
    background:
      linear-gradient(180deg, rgba(0,0,0,.96) 0%, rgba(0,0,0,.87) 46%, rgba(0,0,0,.98) 100%);
  }

  .hero-grid{
    min-height:auto;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:24px;
    padding-top:34px;
    padding-bottom:118px;
  }

  .hero-content{
    order:1;
    padding-top:0;
    width:100%;
  }

  .eyebrow{
    margin-bottom:12px;
    font-size:1rem;
  }

  .hero h1{
    max-width:9ch;
    font-size:clamp(2.65rem, 14vw, 4.1rem);
    line-height:1;
    letter-spacing:.5px;
  }

  .hero h2{
    margin:18px 0 22px;
    font-size:1.1rem;
    line-height:1.45;
  }

  .hero-buttons{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    max-width:340px;
  }

  .btn{
    width:100%;
    min-height:50px;
    padding:0 18px;
  }

  .hero-image{
    order:2;
    width:100%;
    height:auto;
    justify-content:center;
    align-items:center;
    margin-top:4px;
  }

  .hero-image img{
    width:min(78vw, 330px);
    transform:none;
    filter:brightness(.34) contrast(1.12) grayscale(1);
  }

  .hero-wave svg{
    height:94px;
  }

  .scroll-indicator{
    display:none;
  }

  .about-section,
  .filled-section{
    padding:52px 0 58px;
  }

  .section-head{
    margin-bottom:30px;
  }

  .section-head h3{
    font-size:1.95rem;
  }

  .divider span{
    width:52px;
  }

  .about-grid{
    grid-template-columns:1fr;
    gap:28px;
  }

  .about-photo-stack{
    position:relative;
    min-height:auto;
    width:100%;
    display:grid;
    place-items:center;
    padding:4px 0 18px;
  }

  .bg-card{
    position:absolute;
    left:50%;
    top:0;
    transform:translateX(-58%);
    width:min(76vw, 292px);
    height:auto;
    aspect-ratio:3/4;
    border-radius:8px;
  }

  .photo-card{
    position:relative;
    left:auto;
    top:auto;
    width:min(76vw, 292px);
    margin:30px auto 0;
    border-radius:8px;
  }

  .photo-card img{
    aspect-ratio:3/4;
    object-fit:cover;
  }

  .about-content{
    padding-right:0;
  }

  .mini-title{
    font-size:.95rem;
  }

  .about-content h4{
    font-size:1.55rem;
    line-height:1.35;
    margin-bottom:18px;
  }

  .about-content p{
    font-size:.94rem;
    line-height:1.75;
    margin-bottom:14px;
  }

  .info-box{
    grid-template-columns:1fr;
    padding:18px;
    gap:14px;
    margin-top:20px;
  }

  .info-col{
    gap:12px;
  }

  .info-item{
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:baseline;
    font-size:.88rem;
    gap:8px;
    padding-left:20px;
  }

  .info-item span{
    min-width:0;
    word-break:break-word;
  }

  .side-social{
    position:static;
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-start;
    gap:10px;
    margin-top:18px;
  }

  .side-social a{
    width:40px;
    height:40px;
  }

  .service-grid,
  .project-grid,
  .resume-grid,
  .contact-cards{
    grid-template-columns:1fr;
    gap:14px;
  }

  .simple-card,
  .resume-card,
  .contact-card{
    min-height:auto;
    padding:20px;
  }

  .simple-card h4,
  .resume-card h4,
  .contact-card h4{
    font-size:1.15rem;
  }

  .simple-card p,
  .resume-card p,
  .contact-card p,
  .resume-card ul{
    font-size:.93rem;
    line-height:1.75;
  }

  .contact-filled{
    padding-bottom:66px;
  }
}

@media (max-width: 430px){
  .container{
    width:min(100% - 18px, 1200px);
  }

  .brand{
    font-size:1.28rem;
  }

  .nav a{
    font-size:.78rem;
    padding:7px 10px;
  }

  .hero-grid{
    padding-top:26px;
    padding-bottom:104px;
  }

  .hero h1{
    font-size:clamp(2.25rem, 14vw, 3.2rem);
  }

  .hero h2{
    font-size:1rem;
  }

  .hero-image img{
    width:min(82vw, 292px);
  }

  .section-head h3{
    font-size:1.7rem;
  }

  .about-content h4{
    font-size:1.36rem;
  }

  .info-item{
    grid-template-columns:1fr;
    gap:4px;
  }
}


/* =========================================================
   FINAL PHONE FIX — prevents About image from becoming huge
   and stops text/image overlap on small screens.
========================================================= */

@media (max-width: 900px){
  .about-section{
    overflow:hidden !important;
  }

  .about-grid{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:26px !important;
  }

  .about-photo-stack{
    position:relative !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    padding:0 !important;
    margin:0 auto 10px !important;
  }

  .about-photo-stack .bg-card,
  .bg-card{
    position:absolute !important;
    z-index:0 !important;
    top:16px !important;
    left:50% !important;
    transform:translateX(-57%) !important;
    width:min(70vw, 245px) !important;
    height:min(93vw, 328px) !important;
    max-height:328px !important;
    border-radius:8px !important;
  }

  .about-photo-stack .photo-card,
  .photo-card{
    position:relative !important;
    z-index:1 !important;
    inset:auto !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    transform:none !important;
    width:min(70vw, 245px) !important;
    height:min(93vw, 328px) !important;
    max-height:328px !important;
    margin:44px auto 0 !important;
    overflow:hidden !important;
    border-radius:8px !important;
  }

  .about-photo-stack .photo-card img,
  .photo-card img{
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:cover !important;
    object-position:center top !important;
    display:block !important;
    aspect-ratio:auto !important;
  }

  .about-content{
    position:relative !important;
    z-index:2 !important;
    width:100% !important;
    padding:0 !important;
    margin:0 !important;
    clear:both !important;
  }

  .about-content h4{
    overflow-wrap:break-word !important;
    word-break:normal !important;
    hyphens:auto !important;
  }

  .about-content p{
    max-width:100% !important;
    overflow-wrap:break-word !important;
  }

  .info-box{
    width:100% !important;
    overflow:hidden !important;
  }

  .side-social{
    position:static !important;
    right:auto !important;
    bottom:auto !important;
  }
}

@media (max-width: 480px){
  .container{
    width:calc(100% - 22px) !important;
  }

  .about-section,
  .filled-section{
    padding-top:42px !important;
    padding-bottom:48px !important;
  }

  .about-photo-stack .bg-card,
  .bg-card{
    width:230px !important;
    height:306px !important;
    max-width:calc(100vw - 80px) !important;
  }

  .about-photo-stack .photo-card,
  .photo-card{
    width:230px !important;
    height:306px !important;
    max-width:calc(100vw - 80px) !important;
    margin-top:38px !important;
  }

  .hero-image img{
    max-height:360px !important;
    object-fit:contain !important;
  }

  .about-content h4{
    font-size:1.28rem !important;
    line-height:1.35 !important;
  }

  .about-content p{
    font-size:.92rem !important;
    line-height:1.72 !important;
  }
}

@media (max-width: 370px){
  .about-photo-stack .bg-card,
  .bg-card{
    width:205px !important;
    height:274px !important;
  }

  .about-photo-stack .photo-card,
  .photo-card{
    width:205px !important;
    height:274px !important;
  }
}
