:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --surface-soft:#eef5f3;
  --text:#101828;
  --muted:#667085;
  --border:#d9e2ec;
  --accent:#0f766e;
  --accent-dark:#0b5f59;
  --accent-soft:#d9f2ee;
  --blue:#2563eb;
  --amber:#b7791f;
  --rose:#be123c;
  --shadow:0 16px 40px rgba(16,24,40,.08);
  --shadow-soft:0 8px 24px rgba(16,24,40,.06);
  --max:1160px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Cairo,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(15,118,110,.08), transparent 34%),
    linear-gradient(180deg,#fbfcff 0%,var(--bg) 44%,#f8fafc 100%);
  color:var(--text);
  line-height:1.7;
  text-align:right;
}

a{color:inherit;text-decoration:none}
img{max-width:100%}
.container{width:min(var(--max),calc(100% - 40px));margin:auto}

.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,255,255,.82);
  border-bottom:1px solid rgba(217,226,236,.78);
  backdrop-filter:blur(14px);
}

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

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}

.brand::before{
  content:"";
  width:13px;
  height:13px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--blue));
  box-shadow:0 0 0 5px rgba(15,118,110,.12);
}

.nav{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.nav a{
  padding:8px 12px;
  border-radius:8px;
  color:var(--muted);
  font-size:.94rem;
  font-weight:700;
}

.nav a:hover{
  background:var(--surface-soft);
  color:var(--accent-dark);
}

.hero{
  padding:92px 0 76px;
  border-bottom:1px solid rgba(217,226,236,.75);
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr);
  gap:44px;
  align-items:center;
}

.eyebrow,.section-kicker{
  margin:0 0 12px;
  color:var(--accent);
  font-weight:800;
  font-size:.84rem;
}

h1{
  margin:0;
  max-width:850px;
  font-size:clamp(2.25rem,5.5vw,4.65rem);
  line-height:1.16;
  letter-spacing:0;
}

h2{
  margin:0 0 18px;
  font-size:clamp(1.75rem,3.6vw,2.65rem);
  line-height:1.2;
  letter-spacing:0;
}

h3{
  margin:0 0 10px;
  letter-spacing:0;
  line-height:1.35;
}

.lead{
  max-width:760px;
  margin:24px 0;
  color:var(--muted);
  font-size:1.14rem;
}

.actions,.quick-links,.contact-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.quick-links{margin-top:24px}
.quick-links a,.text-link{
  color:var(--accent-dark);
  font-weight:800;
}

.quick-links a{
  padding-bottom:3px;
  border-bottom:1px solid rgba(15,118,110,.32);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border-radius:8px;
  border:1px solid var(--border);
  font-weight:800;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-soft);
}

.btn.primary{
  background:var(--accent);
  color:white;
  border-color:var(--accent);
}

.btn.primary:hover{background:var(--accent-dark)}
.btn.secondary{background:var(--surface)}

.hero-card,.skill-card,.timeline-item,.project-card,.contact-box{
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:var(--shadow-soft);
}

.hero-card{
  position:relative;
  overflow:hidden;
  padding:28px;
}

.hero-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,rgba(15,118,110,.12),rgba(37,99,235,.09) 45%,transparent 70%);
  pointer-events:none;
}

.hero-card > *{position:relative}

.profile-block{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:20px;
}

.profile-block img{
  width:82px;
  height:82px;
  flex:0 0 82px;
  object-fit:cover;
  object-position:center 28%;
  border-radius:8px;
  border:3px solid #fff;
  box-shadow:0 10px 24px rgba(16,24,40,.16);
}

.profile-block strong,
.profile-block span{
  display:block;
}

.profile-block strong{
  font-size:1.08rem;
  line-height:1.35;
}

.profile-block span{
  color:var(--muted);
  font-size:.9rem;
  font-weight:700;
}

.status{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  background:#ecfdf3;
  color:#027a48;
  font-size:.82rem;
  font-weight:800;
  margin-bottom:20px;
}

.metric{
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:16px 0;
  border-bottom:1px solid rgba(217,226,236,.86);
}

.metric:last-child{border-bottom:0}
.metric strong{font-size:1.02rem}
.metric span,.muted{color:var(--muted)}

.section{padding:86px 0}
.section.alt{
  background:linear-gradient(180deg,#edf3f7 0%,#f6f8fb 100%);
  border-top:1px solid rgba(217,226,236,.62);
  border-bottom:1px solid rgba(217,226,236,.62);
}

.two-col{
  display:grid;
  grid-template-columns:.78fr 1.22fr;
  gap:56px;
  align-items:start;
}

.two-col p{
  margin-top:0;
  color:var(--muted);
  font-size:1.03rem;
}

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

.skill-card,.project-card{padding:24px}
.skill-card{border-top:4px solid var(--accent)}
.skill-card:nth-child(2){border-top-color:var(--blue)}
.skill-card:nth-child(3){border-top-color:var(--amber)}
.skill-card:nth-child(4){border-top-color:var(--rose)}

.skill-card p,.project-card p{
  color:var(--muted);
  margin-bottom:0;
}

.timeline{display:grid;gap:18px}
.timeline-item{
  position:relative;
  padding:26px;
}

.timeline-item::before{
  content:"";
  position:absolute;
  top:26px;
  bottom:26px;
  right:0;
  width:4px;
  background:linear-gradient(180deg,var(--accent),var(--blue));
  border-radius:999px 0 0 999px;
}

.timeline-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.timeline-item ul{margin-bottom:0}

.tag{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  background:#eef4ff;
  color:#3538cd;
  font-size:.8rem;
  font-weight:800;
}

.project-card{
  display:flex;
  flex-direction:column;
  gap:0;
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.project-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow);
  border-color:#c5d3e1;
}

.project-cover{
  display:block;
  margin:-24px -24px 20px;
  background:#e8eef5;
  border-bottom:1px solid var(--border);
}

.project-cover img{
  display:block;
  width:100%;
  aspect-ratio:16/8.2;
  object-fit:cover;
  object-position:top;
}

.mobile-cover img{
  aspect-ratio:16/8.2;
  object-fit:cover;
  object-position:center 12%;
}

.project-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  gap:12px;
}

.compact{
  padding-right:18px;
  color:var(--muted);
}

.compact li{margin:5px 0}
.text-link{display:inline-block;margin-top:12px}

.project-details{
  margin-top:18px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fbfdff;
  overflow:hidden;
}

.media-details{
  margin-top:12px;
  background:var(--surface);
}

.project-details summary{
  cursor:pointer;
  color:var(--accent-dark);
  font-weight:800;
  list-style-position:inside;
  padding:12px 14px;
}

.project-details summary:hover{background:var(--surface-soft)}

.details-body{
  display:grid;
  gap:12px;
  padding:0 14px 14px;
}

.details-body p{margin:0}

.tech-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.tech-list span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:4px 10px;
  border:1px solid rgba(15,118,110,.2);
  border-radius:999px;
  background:var(--accent-soft);
  color:#17423e;
  font-size:.82rem;
  font-weight:800;
}

.project-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:0 14px 14px;
}

.project-gallery a{
  display:block;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--bg);
  transition:transform .18s ease, border-color .18s ease;
}

.project-gallery a:hover{
  transform:translateY(-2px);
  border-color:#b8c6d6;
}

.project-gallery img{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  object-position:top;
  border-bottom:1px solid var(--border);
}

.mobile-gallery img{
  aspect-ratio:9/16;
  object-position:top;
}

.mobile-gallery .desktop-shot img{aspect-ratio:16/9}

.project-gallery span{
  display:block;
  padding:8px 10px;
  color:var(--text);
  font-size:.86rem;
  font-weight:800;
}

.contact-box{
  padding:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  background:
    linear-gradient(135deg,rgba(15,118,110,.1),rgba(37,99,235,.08)),
    var(--surface);
}

.footer{
  padding:28px 0;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:.9rem;
}

@media (max-width:900px){
  .hero-grid,.two-col,.skill-grid,.project-grid{grid-template-columns:1fr}
  .nav{display:none}
  .hero{padding-top:64px}
  .contact-box{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width:560px){
  .container{width:min(var(--max),calc(100% - 24px))}
  .section{padding:64px 0}
  .hero{padding-bottom:56px}
  .timeline-head,.project-top{
    flex-direction:column;
    align-items:flex-start;
  }
  .project-gallery{grid-template-columns:1fr}
  .btn{width:100%}
  .quick-links a{font-size:.92rem}
}
