:root{
  --bg:#f7f8fa;
  --sidebar:#f1f1f1;
  --accent:#0b1220;
  --muted:#6b7280;
  --card:#ffffff;
  --accent-strong:#0f1724;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, serif;
  background:linear-gradient(180deg,#fbfdff,#f1f4f8);
  color:var(--accent);
  display:flex;
  min-height:100vh;
  line-height:1.5;
}

/* Sidebar */
.sidebar{
  width:260px;
  background:var(--sidebar);
  padding:24px 18px;
  border-right:1px solid rgba(0,0,0,0.06);
  position:fixed;
  height:100vh;
  overflow:auto;
}

.avatar{
  width:56px;height:56px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 4px 10px rgba(2,6,23,0.08);
}
.profile{display:flex;gap:12px;align-items:center;min-width:0}
.profile .details{display:flex;flex-direction:column;min-width:0;overflow:visible}
.profile .name{margin:0;font-size:18px;white-space:normal;word-break:break-word;font-weight:700}
.profile .role{margin:0;color:var(--muted);font-size:13px;white-space:normal}

/* nav */
.nav{margin-top:18px;display:flex;flex-direction:column;gap:8px}
.nav-link{
  display:inline-block;padding:10px 12px;border-radius:8px;color:var(--accent-strong);text-decoration:none;font-weight:600;
}
.nav-link.active{background:var(--accent-strong);color:#fff;box-shadow:0 6px 18px rgba(2,6,23,0.08)}
.connect{margin-top:28px}
.connect h3{font-size:13px;color:var(--muted);margin:0 0 8px}
.connect ul{padding-left:18px;margin:0}
.connect li{margin-bottom:8px}

/* Main content */
.main{
  margin-left:260px;
  padding:48px 64px;
  flex:1;
  background:transparent;
}

.hero h1{font-size:48px;margin:0 0 6px;line-height:1.02}
.highlight{background:#fff;padding:0 6px;border-radius:4px;box-shadow:0 6px 16px rgba(253,186,116,0.12)}
.subtitle{color:var(--muted);font-size:20px;margin:6px 0 18px}
.card.intro{background:var(--card);padding:18px;border-radius:12px;box-shadow:0 10px 30px rgba(2,6,23,0.06);max-width:880px}

.links{margin-top:18px;display:flex;gap:12px}
.btn{display:inline-block;padding:10px 16px;border-radius:8px;text-decoration:none;background:var(--accent-strong);color:#fff}
.btn.ghost{background:transparent;border:1px solid rgba(0,0,0,0.08);color:var(--accent-strong)}

/* sections */
.section{margin-top:40px}
.section h2{font-size:24px;margin-bottom:12px}
.item{background:var(--card);padding:18px;border-radius:10px;margin-bottom:12px;box-shadow:0 6px 18px rgba(2,6,23,0.04)}
.meta{display:block;color:var(--muted);font-size:13px;margin-bottom:8px}
.projects-list{list-style:disc;margin-left:20px}

/* contact grid */
.contact-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.contact-grid p{margin:0 0 10px}

/* skills */
.skills{list-style:disc;margin-left:20px}

/* footer */
.footer{margin-top:48px;color:var(--muted);font-size:14px;padding-bottom:40px}

/* Responsive */
@media (max-width:1100px){
  .main{padding:30px 28px}
  .hero h1{font-size:40px}
}
@media (max-width:900px){
  .sidebar{position:relative;width:100%;height:auto;border-right:none;padding:14px;display:flex;gap:12px;align-items:center}
  .main{margin-left:0;padding:18px}
  .hero h1{font-size:32px}
  .contact-grid{grid-template-columns:1fr}
}
/* ---------- MOBILE HEADER & SIDEBAR OVERLAY ---------- */
/* Show mobile header and hide desktop sidebar on small screens */
.mobile-header{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 14px;
  background:var(--sidebar);
  border-bottom:1px solid rgba(0,0,0,0.04);
  position:fixed;
  top:0; left:0; right:0;
  z-index:60;
  height:56px;
}
.mobile-header .mobile-left{display:flex;align-items:center;gap:10px}
.mobile-header .mobile-logo{width:36px;height:36px;border-radius:8px;object-fit:cover}
.mobile-header .mobile-title{font-weight:700;font-size:15px;color:var(--accent-strong)}

/* mobile menu button */
#mobile-menu-btn{
  background:transparent;border:0;font-size:22px;padding:6px 10px;cursor:pointer;color:var(--accent-strong)
}

/* overlay sidebar when opened */
.sidebar.mobile-open{
  position:fixed;
  inset:56px 0 auto 0; /* below header */
  width:80%;
  max-width:340px;
  height:calc(100vh - 56px);
  background:var(--sidebar);
  box-shadow: 4px 0 30px rgba(2,6,23,0.12);
  transform:translateX(-110%);
  transition:transform .26s ease;
  z-index:70;
  overflow:auto;
}

/* visible state */
.sidebar.mobile-open.open {
  transform: translateX(0);
}

/* darken page behind overlay */
.mobile-backdrop{
  display:none;
  position:fixed; inset:56px 0 0 0;
  background:rgba(2,6,23,0.35);
  z-index:65;
  transition:opacity .2s ease;
}

/* show header + hide desktop layout at <=900px */
@media (max-width:900px){
  .mobile-header{display:flex}
  .sidebar{display:block; position:fixed; left:0; top:56px; bottom:0; width:80%; max-width:340px; transform:translateX(-110%); transition:transform .26s ease; z-index:70}
  .sidebar.mobile-open.open{transform:translateX(0)}
  .main{margin-left:0;padding-top:76px; /* allow for header height */ padding-left:18px;padding-right:18px}
  .mobile-backdrop{display:none}
  .mobile-backdrop.visible{display:block}
}

/* prevent body scroll when menu open */
body.menu-open{overflow:hidden}

/* small adjustments for tiny screens */
@media (max-width:420px){
  .mobile-header .mobile-title{font-size:14px}
  .hero h1{font-size:28px}
}
