
:root{
  --bg:#f8f7f2;--card:#fff;--ink:#101828;--muted:#667085;--navy:#0b1220;
  --navy2:#151d2e;--gold:#caa95c;--line:#e5e7eb;--soft:#f1f0ea;
  --success:#067647;--danger:#b42318;--shadow:0 24px 70px rgba(16,24,40,.10)
}
*{box-sizing:border-box}html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);line-height:1.6}
a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}button{cursor:pointer}
.wrap{width:min(1160px,calc(100% - 40px));margin:auto}
nav{position:sticky;top:0;z-index:50;background:rgba(248,247,242,.9);backdrop-filter:blur(14px);border-bottom:1px solid rgba(16,24,40,.07)}
.nav{height:72px;display:flex;align-items:center;justify-content:space-between}.brand{font-weight:900;font-size:20px;letter-spacing:-.04em}.brand span{color:var(--gold)}
.links{display:flex;gap:22px;align-items:center;font-size:13px;font-weight:700;color:#596273}.navcv{background:var(--navy);color:#fff;padding:10px 14px;border-radius:10px}
.hero{min-height:calc(100vh - 72px);display:grid;grid-template-columns:1.15fr .85fr;gap:68px;align-items:center;padding:70px 0 84px}
.badge{display:inline-flex;gap:9px;align-items:center;border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#536070}.badge i{width:8px;height:8px;border-radius:50%;background:var(--gold)}
h1{font-size:clamp(52px,7vw,92px);line-height:.94;letter-spacing:-.065em;margin:22px 0}h1 em{font-style:normal;color:var(--gold)}
.lead{font-size:18px;color:var(--muted);max-width:680px}.chips{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}.chip{background:#fff;border:1px solid var(--line);border-radius:9px;padding:8px 11px;font-size:12px;font-weight:750;color:#475467}
.actions{display:flex;flex-wrap:wrap;gap:11px;margin-top:30px}.btn{min-height:49px;padding:0 18px;border:1px solid var(--navy);border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-weight:850;background:transparent}.btn.primary{background:var(--navy);color:#fff}
.hero-card{min-height:560px;background:var(--navy);border-radius:30px;padding:26px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;position:relative;box-shadow:var(--shadow)}
.hero-card:before{content:"";position:absolute;width:420px;height:420px;border-radius:50%;background:rgba(202,169,92,.13);right:-180px;top:-170px}
.avatar{width:240px;height:240px;border-radius:50%;margin:42px auto 10px;display:grid;place-items:center;background:linear-gradient(145deg,#27334d,#111827);color:#fff;font-size:62px;font-weight:900;overflow:hidden;position:relative;z-index:2}.avatar img{width:100%;height:100%;object-fit:cover}
.photo-note{text-align:center;font-size:12px;color:#aeb7c7;position:relative;z-index:2}
.rolebox{position:relative;z-index:2;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:22px;color:#fff}.rolebox h3{font-size:24px;margin:4px 0}.rolebox small{color:#aeb7c7}
section{padding:92px 0}.head{display:flex;justify-content:space-between;gap:30px;align-items:end;margin-bottom:38px}.eyebrow{font-size:11px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;color:#7a8493}h2{font-size:clamp(34px,4.5vw,56px);line-height:1.02;letter-spacing:-.05em;margin:8px 0 0}.head p{max-width:520px;color:var(--muted);margin:0}
.about-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:20px}.panel{background:#fff;border:1px solid var(--line);border-radius:23px;padding:30px}.panel p{margin:0;color:var(--muted);white-space:pre-line}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:13px}.stat{background:var(--navy);color:#fff;border-radius:19px;padding:22px;min-height:128px;display:flex;flex-direction:column;justify-content:end}.stat strong{font-size:32px}.stat span{font-size:12px;color:#aeb7c7}
.timeline{display:grid;gap:15px}.job{display:grid;grid-template-columns:190px 1fr;gap:25px;background:#fff;border:1px solid var(--line);border-radius:21px;padding:25px}.period{font-size:12px;font-weight:850;color:#7a8494;text-transform:uppercase;letter-spacing:.07em}.job h3{margin:0}.company{color:var(--gold);font-size:13px;font-weight:850}.job ul{color:var(--muted);padding-left:18px}
.grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.card{background:#fff;border:1px solid var(--line);border-radius:23px;padding:25px;min-height:245px;transition:.2s}.card:hover{transform:translateY(-3px);box-shadow:0 16px 40px rgba(16,24,40,.06)}.card h3{font-size:23px;line-height:1.12;margin:12px 0 9px}.card p{color:var(--muted);margin:0}.meta{font-size:11px;font-weight:900;letter-spacing:.14em;color:#8c95a3}.tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:20px}.tag{background:var(--soft);padding:7px 9px;border-radius:8px;font-size:11px;font-weight:800;color:#525a68}.cardimg{width:100%;aspect-ratio:16/8;object-fit:cover;border-radius:15px;margin-bottom:16px}
.feed-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.feed{background:#fff;border:1px solid var(--line);border-radius:21px;overflow:hidden}.feed img{width:100%;aspect-ratio:4/3;object-fit:cover}.feedbody{padding:20px}.feedbody h3{margin:7px 0}.feedbody p{color:var(--muted);white-space:pre-line}.feedmeta{font-size:11px;color:#7a8494;font-weight:800}
.skills{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.skillbox{background:#fff;border:1px solid var(--line);border-radius:20px;padding:23px}.skillbox h3{margin-top:0}.skillbox ul{color:var(--muted);padding-left:18px}
.edu-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.edu{background:#fff;border:1px solid var(--line);border-radius:21px;padding:24px}.edu .period{margin-bottom:8px}.edu h3{margin:0 0 4px}.edu p{color:var(--muted);margin:0}
.empty{grid-column:1/-1;padding:34px;text-align:center;background:#fff;border:1px dashed #cbd0d9;border-radius:18px;color:var(--muted)}
.contact{background:var(--navy);color:#fff;border-radius:29px;padding:50px;display:grid;grid-template-columns:1fr auto;gap:25px;align-items:end}.contact p{color:#aeb7c7}.socials{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.social{border:1px solid rgba(255,255,255,.15);border-radius:9px;padding:8px 10px;font-size:12px;color:#c7ced8}.contact .btn{background:#fff;color:var(--navy);border-color:#fff}
footer{padding:30px 0 45px;font-size:13px;color:#7a8494}.foot{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}.setup{background:#fff3cd;border-bottom:1px solid #ead895;color:#664d03;padding:9px;text-align:center;font-size:12px;font-weight:700;display:none}

/* admin */
.admin-body{background:#f3f4f6}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--navy)}.login-card{width:min(430px,100%);background:#fff;border-radius:22px;padding:30px;box-shadow:var(--shadow)}.login-card h1{font-size:31px;margin:5px 0 8px}.login-card p{color:var(--muted)}
.field{display:grid;gap:6px;margin-bottom:13px}.field label{font-size:12px;font-weight:800;color:#475467}.field input,.field textarea,.field select{border:1px solid #d0d5dd;border-radius:9px;padding:10px 11px;width:100%;background:#fff}.field textarea{min-height:92px;resize:vertical}
.notice{padding:10px 12px;border-radius:9px;background:#f2f4f7;color:#475467;font-size:12px;margin:10px 0}.notice.error{background:#fee4e2;color:var(--danger)}.notice.ok{background:#ecfdf3;color:var(--success)}
.admin-shell{min-height:100vh;display:grid;grid-template-columns:255px 1fr}.sidebar{background:var(--navy);color:#fff;min-height:100vh;padding:26px 17px;position:sticky;top:0;height:100vh}.sidebar .logo{font-size:22px;font-weight:900;margin:0 10px 25px}.sidebar .logo span{color:var(--gold)}.menu{display:grid;gap:5px}.menu button{border:0;background:transparent;color:#b7c0d1;text-align:left;border-radius:9px;padding:10px 12px;font-weight:750}.menu button.active,.menu button:hover{background:rgba(255,255,255,.09);color:#fff}.sidebar-foot{position:absolute;left:17px;right:17px;bottom:20px;display:grid;gap:8px}.sidebar-foot a,.sidebar-foot button{background:transparent;border:1px solid rgba(255,255,255,.15);color:#fff;border-radius:9px;padding:9px;text-align:center;font-size:12px}
.admin-main{padding:32px;max-width:1180px;width:100%}.admin-head{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.admin-head h2{font-size:32px;margin:0}.pill{background:#ecfdf3;color:var(--success);border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800}
.admin-section{display:none}.admin-section.active{display:block}.admin-grid{display:grid;grid-template-columns:420px 1fr;gap:20px;align-items:start}.admin-card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:21px}.admin-card h3{margin-top:0}
.form-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.smallbtn{border:0;border-radius:9px;padding:9px 12px;font-weight:800;background:var(--navy);color:#fff}.smallbtn.ghost{background:#eef0f3;color:#344054}.smallbtn.danger{background:#fee4e2;color:var(--danger)}
.list{display:grid;gap:9px}.item{border:1px solid var(--line);border-radius:13px;padding:13px;display:flex;justify-content:space-between;gap:12px;align-items:start}.item b{display:block}.item small{color:var(--muted)}.itemactions{display:flex;gap:6px}.uploadline{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
@media(max-width:980px){.admin-shell{grid-template-columns:1fr}.sidebar{height:auto;min-height:auto;position:relative}.menu{grid-template-columns:repeat(4,1fr)}.sidebar-foot{position:static;margin-top:18px;grid-template-columns:1fr 1fr}.admin-main{padding:20px}.admin-grid{grid-template-columns:1fr}.feed-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.links a:not(.navcv){display:none}.hero{grid-template-columns:1fr;min-height:auto}.about-grid,.edu-grid{grid-template-columns:1fr}.grid2{grid-template-columns:1fr}.skills{grid-template-columns:1fr 1fr}.job{grid-template-columns:1fr}.contact{grid-template-columns:1fr}}
@media(max-width:620px){.wrap{width:min(100% - 24px,1160px)}.navcv{display:none}.hero{padding-top:40px}h1{font-size:50px}.hero-card{min-height:430px}.avatar{width:185px;height:185px;font-size:48px}.head{display:block}.head p{margin-top:14px}.stats,.skills,.feed-grid{grid-template-columns:1fr}.contact{padding:30px 23px}.admin-main{padding:14px}.menu{grid-template-columns:1fr 1fr}.admin-head{flex-direction:column;align-items:flex-start}}


/* Clean contact layout */
.contact-clean{
  display:block;
}
.contact-content{
  max-width:1000px;
}
.contact-clean .contact-actions{
  justify-content:flex-start;
  margin-top:26px;
}
.contact-clean .contact-actions .btn{
  min-width:150px;
}
@media(max-width:620px){
  .contact-clean .contact-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .contact-clean .contact-actions .btn{
    width:100%;
    min-width:0;
  }
}





.upload-preview:empty{display:none}
.upload-preview img{display:block}


/* Unified upload previews */
.profile-upload-preview,
.cv-upload-preview{
  margin:4px 0 10px;
}
.profile-preview-img{
  display:block;
  width:130px;
  height:130px;
  object-fit:cover;
  border-radius:18px;
  border:1px solid var(--line);
  background:#f2f4f7;
}
.cv-preview-link{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#f8f9fb;
  font-size:12px;
  font-weight:800;
  color:#344054;
}
.upload-empty{
  font-size:12px;
  color:#98a2b3;
  padding:9px 11px;
  border:1px dashed #d0d5dd;
  border-radius:9px;
  background:#fafafa;
}


/* Scoped CRUD uploader fix */
.upload-field input[name="image_url"]:not(:placeholder-shown){
  background:#f6fffa;
  border-color:#a6d8be;
}
.inUpload:disabled{
  opacity:.7;
  cursor:wait;
}


/* Polished clickable feeds */
.feed-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  align-items:start;
}
.feed{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  transition:.22s ease;
  min-width:0;
}
.feed-clickable{
  cursor:pointer;
}
.feed-clickable:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 42px rgba(16,24,40,.08);
  border-color:#d8dbe2;
}
.feed-clickable:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}
.feed-image-wrap{
  width:100%;
  aspect-ratio:16/10;
  overflow:hidden;
  background:#eef0f3;
}
.feed-image-wrap img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.feed-image-placeholder{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#111827,#24314a);
  color:#fff;
  font-size:18px;
  font-weight:900;
  letter-spacing:.08em;
}
.feedbody{
  padding:21px 22px 22px;
  min-width:0;
}
.feedbody h3{
  margin:7px 0 10px;
  font-size:20px;
  line-height:1.25;
  letter-spacing:-.025em;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.feedmeta{
  font-size:11px;
  color:#7a8494;
  font-weight:850;
  letter-spacing:.01em;
}
.feed-excerpt{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.feed-readmore{
  margin-top:17px;
  font-size:12px;
  font-weight:850;
  color:var(--ink);
}

/* Feed detail modal */
body.modal-open{
  overflow:hidden;
}
.feed-modal{
  position:fixed;
  inset:0;
  z-index:999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.feed-modal.open{
  display:flex;
}
.feed-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,12,23,.72);
  backdrop-filter:blur(5px);
}
.feed-modal-dialog{
  position:relative;
  z-index:1;
  width:min(760px,100%);
  max-height:min(88vh,900px);
  overflow:auto;
  background:#fff;
  border-radius:26px;
  box-shadow:0 28px 90px rgba(0,0,0,.28);
}
.feed-modal-close{
  position:absolute;
  top:14px;
  right:14px;
  z-index:3;
  width:40px;
  height:40px;
  border:0;
  border-radius:50%;
  background:rgba(10,16,32,.88);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:26px;
  line-height:1;
}
.feed-modal-image-wrap{
  width:100%;
  max-height:430px;
  overflow:hidden;
  background:#eef0f3;
}
.feed-modal-image-wrap img{
  width:100%;
  max-height:430px;
  display:block;
  object-fit:cover;
}
.feed-modal-content{
  padding:30px 32px 34px;
}
.feed-modal-meta{
  color:#7a8494;
  font-size:12px;
  font-weight:850;
  margin-bottom:8px;
}
.feed-modal-content h2{
  font-size:clamp(28px,4vw,42px);
  margin:0 0 18px;
  line-height:1.08;
}
.feed-modal-body{
  color:#475467;
  font-size:16px;
  line-height:1.8;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.feed-modal-external{
  margin-top:24px;
  min-height:44px;
  padding:0 15px;
  border-radius:10px;
  background:var(--navy);
  color:#fff;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:850;
}
@media(max-width:980px){
  .feed-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .feed-grid{grid-template-columns:1fr}
  .feed-modal{padding:10px}
  .feed-modal-dialog{border-radius:20px;max-height:92vh}
  .feed-modal-content{padding:24px 20px 28px}
}


/* Feed modal close fix */
.feed-modal-close{
  cursor:pointer;
  transition:.18s ease;
}
.feed-modal-close:hover{
  transform:scale(1.06);
  background:#111827;
}
.feed-modal-backdrop{
  cursor:pointer;
}


/* ===== AUDIT IMPROVEMENTS ===== */
section[id]{
  scroll-margin-top:88px;
}
.card,
.feed,
.job,
.edu,
.skillbox,
.panel{
  min-width:0;
}
.card p,
.edu p,
.job li{
  overflow-wrap:anywhere;
  word-break:normal;
}

/* Project cards stay compact */
.project-image-wrap{
  width:100%;
  height:220px;
  overflow:hidden;
  border-radius:15px;
  margin-bottom:16px;
  background:#eef0f3;
}
.project-image-wrap img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.project-excerpt{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:4;
  overflow:hidden;
  line-height:1.65;
}
.card-link-row{
  margin-top:16px;
  font-size:13px;
}

/* Achievement: normal-size media, no giant zoom/crop */
#achievementList{
  align-items:start;
}
.achievement-card{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.achievement-image-wrap{
  width:100%;
  height:220px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:15px;
  margin-bottom:16px;
  background:#f2f4f7;
  border:1px solid #edf0f3;
}
.achievement-image-wrap img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
}
.achievement-excerpt{
  margin-top:10px!important;
  line-height:1.65;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:4;
  overflow:hidden;
}
.achievement-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:16px;
  font-size:12px;
  font-weight:850;
}
.text-detail-btn{
  border:0;
  padding:0;
  background:transparent;
  color:var(--ink);
  font-weight:850;
  cursor:pointer;
}
.text-detail-btn:hover,
.achievement-actions a:hover,
.card-link-row a:hover{
  text-decoration:underline;
}

/* Shared achievement detail modal */
.detail-modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.detail-modal.open{
  display:flex;
}
.detail-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,12,23,.72);
  backdrop-filter:blur(5px);
  cursor:pointer;
}
.detail-modal-dialog{
  position:relative;
  z-index:1;
  width:min(720px,100%);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border-radius:26px;
  box-shadow:0 28px 90px rgba(0,0,0,.28);
}
.detail-modal-close{
  position:absolute;
  top:14px;
  right:14px;
  z-index:3;
  width:40px;
  height:40px;
  border:0;
  border-radius:50%;
  background:rgba(10,16,32,.88);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}
.achievement-modal-image-wrap{
  width:100%;
  min-height:180px;
  max-height:400px;
  place-items:center;
  overflow:hidden;
  background:#f2f4f7;
}
.achievement-modal-image-wrap img{
  width:100%;
  max-height:400px;
  object-fit:contain;
  display:block;
}
.detail-modal-content{
  padding:30px 32px 34px;
}
.detail-modal-meta{
  color:#7a8494;
  font-size:12px;
  font-weight:850;
  margin-bottom:8px;
}
.detail-modal-content h2{
  font-size:clamp(28px,4vw,42px);
  margin:0 0 18px;
  line-height:1.08;
}
.detail-modal-body{
  color:#475467;
  font-size:16px;
  line-height:1.8;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.detail-modal-link{
  display:none;
  margin-top:24px;
  min-height:44px;
  padding:0 15px;
  border-radius:10px;
  background:var(--navy);
  color:#fff;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:850;
}

/* Existing feed modal: image should not over-zoom */
.feed-modal-image-wrap{
  display:grid;
  place-items:center;
}
.feed-modal-image-wrap img{
  width:100%;
  height:auto;
  max-height:430px;
  object-fit:contain;
  background:#f2f4f7;
}

/* Better small-screen layout */
@media(max-width:900px){
  .project-image-wrap,
  .achievement-image-wrap{
    height:210px;
  }
}
@media(max-width:620px){
  section{padding:66px 0}
  .project-image-wrap,
  .achievement-image-wrap{
    height:200px;
  }
  .detail-modal{padding:10px}
  .detail-modal-dialog{max-height:92vh;border-radius:20px}
  .detail-modal-content{padding:24px 20px 28px}
  .contact-clean .contact-actions{
    grid-template-columns:1fr 1fr;
  }
}


/* Floating back-to-top */
.floating-top-btn{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:120;
  width:50px;
  height:50px;
  border:1px solid rgba(16,24,40,.10);
  border-radius:50%;
  background:var(--navy);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:22px;
  font-weight:900;
  line-height:1;
  box-shadow:0 14px 34px rgba(10,16,32,.20);
  opacity:0;
  visibility:hidden;
  transform:translateY(10px) scale(.94);
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease;
}
.floating-top-btn.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
.floating-top-btn:hover{
  background:var(--navy2);
  transform:translateY(-2px) scale(1.03);
}
.floating-top-btn:focus-visible{
  outline:3px solid rgba(202,169,92,.45);
  outline-offset:3px;
}
@media(max-width:620px){
  .floating-top-btn{
    right:16px;
    bottom:16px;
    width:46px;
    height:46px;
    font-size:20px;
  }
}


/* Achievement vertical alignment */
#achievementList{
  align-items:center;
}


/* =========================================================
   MOBILE QA — proportional sizing
   401–430: iPhone Pro Max / large Android
   371–400: iPhone 13/14 / common Android
   <=370 : compact Android / smaller devices
   ========================================================= */

/* Large phones: keep breathing room, reduce desktop scale */
@media (max-width:430px){
  .wrap{
    width:calc(100% - 28px);
  }

  .nav{
    height:60px;
  }
  .brand{
    font-size:17px;
  }

  .hero{
    gap:26px;
    padding:34px 0 54px;
  }
  .badge{
    padding:6px 10px;
    font-size:9px;
    letter-spacing:.10em;
  }
  .badge i{
    width:7px;
    height:7px;
  }
  h1{
    font-size:44px;
    line-height:.95;
    margin:18px 0;
  }
  .lead{
    font-size:15px;
    line-height:1.55;
  }
  .chips{
    gap:7px;
    margin-top:17px;
  }
  .chip{
    padding:7px 9px;
    border-radius:8px;
    font-size:10px;
  }

  .hero-card{
    min-height:390px;
    padding:19px;
    border-radius:23px;
  }
  .hero-card:before{
    width:300px;
    height:300px;
    right:-135px;
    top:-125px;
  }
  .avatar{
    width:158px;
    height:158px;
    margin:27px auto 8px;
    font-size:42px;
  }
  .photo-note{
    font-size:10px;
  }
  .rolebox{
    padding:17px;
    border-radius:16px;
  }
  .rolebox h3{
    font-size:20px;
  }
  .rolebox small{
    font-size:11px;
  }

  section{
    padding:56px 0;
  }
  .head{
    margin-bottom:25px;
  }
  h2{
    font-size:34px;
    line-height:1.04;
  }
  .eyebrow{
    font-size:9px;
  }
  .head p,
  .panel p{
    font-size:14px;
  }

  .panel,
  .job,
  .card,
  .skillbox,
  .edu{
    padding:19px;
    border-radius:17px;
  }
  .stats{
    gap:10px;
  }
  .stat{
    min-height:102px;
    padding:17px;
    border-radius:16px;
  }
  .stat strong{
    font-size:27px;
  }
  .stat span{
    font-size:10px;
  }

  .job{
    gap:8px;
  }
  .job h3{
    font-size:18px;
  }
  .job ul{
    font-size:13px;
    padding-left:17px;
    margin-bottom:0;
  }
  .period,
  .company{
    font-size:10px;
  }

  .card{
    min-height:0;
  }
  .card h3{
    font-size:20px;
    margin:10px 0 8px;
  }
  .card p{
    font-size:13px;
  }
  .meta{
    font-size:9px;
  }
  .tag{
    font-size:9px;
    padding:6px 8px;
  }

  .project-image-wrap,
  .achievement-image-wrap{
    height:175px;
    border-radius:13px;
  }

  .feedbody{
    padding:17px;
  }
  .feedbody h3{
    font-size:18px;
  }
  .feed-excerpt{
    font-size:13px;
  }
  .feed-image-wrap{
    aspect-ratio:16/9;
  }

  .skillbox h3,
  .edu h3{
    font-size:18px;
  }
  .skillbox ul,
  .edu p{
    font-size:13px;
  }

  .contact{
    padding:25px 19px;
    border-radius:22px;
  }
  .contact h2{
    font-size:34px;
  }
  .contact p{
    font-size:13px;
  }
  .contact-clean .contact-actions{
    margin-top:19px;
    gap:8px;
  }
  .contact-clean .contact-actions .btn{
    min-height:42px;
    font-size:12px;
    border-radius:10px;
  }

  footer{
    padding:22px 0 32px;
    font-size:11px;
  }

  .floating-top-btn{
    right:14px;
    bottom:14px;
    width:43px;
    height:43px;
    font-size:18px;
    z-index:200;
    pointer-events:none;
  }
  .floating-top-btn.show{
    pointer-events:auto;
  }

  .feed-modal-content,
  .detail-modal-content{
    padding:22px 18px 25px;
  }
  .feed-modal-content h2,
  .detail-modal-content h2{
    font-size:27px;
  }
  .feed-modal-body,
  .detail-modal-body{
    font-size:14px;
    line-height:1.65;
  }

  /* Admin also stays usable on phones */
  .login-card{
    padding:24px 19px;
    border-radius:18px;
  }
  .login-card h1{
    font-size:27px;
  }
  .admin-card{
    padding:17px;
  }
  .field input,
  .field textarea,
  .field select{
    padding:9px 10px;
  }
}

/* iPhone 13/14, standard Android */
@media (max-width:400px){
  .wrap{
    width:calc(100% - 24px);
  }
  .nav{
    height:56px;
  }
  .brand{
    font-size:16px;
  }
  .hero{
    padding:28px 0 48px;
    gap:22px;
  }
  h1{
    font-size:40px;
    margin:16px 0;
  }
  .lead{
    font-size:14px;
  }
  .chip{
    font-size:9px;
    padding:6px 8px;
  }
  .hero-card{
    min-height:350px;
    border-radius:21px;
    padding:17px;
  }
  .avatar{
    width:138px;
    height:138px;
    font-size:37px;
    margin-top:23px;
  }
  .rolebox{
    padding:15px;
  }
  .rolebox h3{
    font-size:18px;
  }

  section{
    padding:50px 0;
  }
  h2{
    font-size:31px;
  }
  .head{
    margin-bottom:22px;
  }

  .panel,
  .job,
  .card,
  .skillbox,
  .edu{
    padding:17px;
  }
  .stat{
    min-height:94px;
    padding:15px;
  }
  .stat strong{
    font-size:25px;
  }

  .project-image-wrap,
  .achievement-image-wrap{
    height:160px;
  }

  .contact{
    padding:22px 17px;
  }
  .contact h2{
    font-size:31px;
  }

  .floating-top-btn{
    width:41px;
    height:41px;
    font-size:17px;
  }
}

/* Small Android / narrow phones */
@media (max-width:370px){
  .wrap{
    width:calc(100% - 20px);
  }
  .hero{
    padding-top:24px;
  }
  .badge{
    font-size:8px;
    padding:5px 8px;
  }
  h1{
    font-size:37px;
  }
  .lead{
    font-size:13px;
  }
  .chips{
    gap:6px;
  }
  .chip{
    font-size:8px;
    padding:6px 7px;
  }
  .hero-card{
    min-height:325px;
    padding:15px;
    border-radius:19px;
  }
  .avatar{
    width:124px;
    height:124px;
    font-size:33px;
    margin-top:19px;
  }
  .rolebox{
    padding:13px;
    border-radius:14px;
  }
  .rolebox h3{
    font-size:17px;
  }

  section{
    padding:44px 0;
  }
  h2{
    font-size:29px;
  }
  .head p,
  .panel p{
    font-size:13px;
  }
  .panel,
  .job,
  .card,
  .skillbox,
  .edu{
    padding:15px;
    border-radius:15px;
  }
  .card h3{
    font-size:18px;
  }
  .job h3{
    font-size:17px;
  }
  .job ul{
    font-size:12px;
  }
  .project-image-wrap,
  .achievement-image-wrap{
    height:145px;
  }
  .feedbody{
    padding:15px;
  }
  .feedbody h3{
    font-size:17px;
  }

  .contact{
    padding:20px 15px;
  }
  .contact h2{
    font-size:29px;
  }
  .contact-clean .contact-actions{
    grid-template-columns:1fr;
  }
  .contact-clean .contact-actions .btn{
    min-height:40px;
  }

  .floating-top-btn{
    right:11px;
    bottom:11px;
    width:39px;
    height:39px;
    font-size:16px;
  }

  .menu{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   MOBILE HEADER / HAMBURGER MENU
   ========================================================= */
.mobile-menu-btn,
.mobile-menu{
  display:none;
}

@media(max-width:900px){
  .desktop-links{
    display:none !important;
  }

  .nav{
    position:relative;
    height:60px;
  }

  .mobile-menu-btn{
    width:42px;
    height:42px;
    border:0;
    border-radius:10px;
    background:transparent;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:0;
    margin-left:auto;
  }
  .mobile-menu-btn span{
    width:21px;
    height:2px;
    border-radius:999px;
    background:var(--ink);
    transition:transform .2s ease, opacity .2s ease;
  }
  .mobile-menu-btn.open span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }
  .mobile-menu-btn.open span:nth-child(2){
    opacity:0;
  }
  .mobile-menu-btn.open span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }

  .mobile-menu{
    display:block;
    max-height:0;
    overflow:hidden;
    opacity:0;
    visibility:hidden;
    background:rgba(248,247,242,.98);
    border-top:1px solid rgba(16,24,40,.06);
    border-bottom:1px solid rgba(16,24,40,.07);
    transition:max-height .28s ease, opacity .2s ease, visibility .2s ease;
  }
  .mobile-menu.open{
    max-height:520px;
    opacity:1;
    visibility:visible;
  }
  .mobile-menu-inner{
    display:grid;
    padding-top:10px;
    padding-bottom:16px;
  }
  .mobile-menu-inner a{
    display:flex;
    align-items:center;
    min-height:44px;
    padding:0 4px;
    border-bottom:1px solid rgba(16,24,40,.06);
    color:#475467;
    font-size:14px;
    font-weight:800;
  }
  .mobile-menu-inner a:last-child{
    border-bottom:0;
  }
  .mobile-menu-inner a:hover{
    color:var(--ink);
  }
  .mobile-cv-link{
    margin-top:10px;
    justify-content:center;
    min-height:46px !important;
    padding:0 16px !important;
    border:0 !important;
    border-radius:11px;
    background:var(--navy);
    color:#fff !important;
  }
}

@media(max-width:400px){
  .nav{
    height:56px;
  }
  .mobile-menu-btn{
    width:38px;
    height:38px;
  }
  .mobile-menu-inner a{
    min-height:42px;
    font-size:13px;
  }
}


/* Polished floating top arrow */
.floating-top-btn{
  width:52px;
  height:52px;
  border-radius:50%;
}
.floating-top-icon{
  width:24px;
  height:24px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
@media(max-width:430px){
  .floating-top-btn{
    width:46px;
    height:46px;
    right:14px;
    bottom:14px;
  }
  .floating-top-icon{
    width:22px;
    height:22px;
    stroke-width:3;
  }
}
@media(max-width:370px){
  .floating-top-btn{
    width:43px;
    height:43px;
    right:11px;
    bottom:11px;
  }
  .floating-top-icon{
    width:20px;
    height:20px;
    stroke-width:3.1;
  }
}


/* =========================================================
   HIGHLIGHTS — unified Achievement + Feed
   ========================================================= */
.highlight-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:start;
}
.highlight-card{
  min-width:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  cursor:pointer;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.highlight-card:hover{
  transform:translateY(-4px);
  border-color:#d7dbe2;
  box-shadow:0 18px 42px rgba(16,24,40,.08);
}
.highlight-card:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}
.highlight-image-wrap{
  width:100%;
  height:210px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#f2f4f7;
  border-bottom:1px solid #eef0f3;
}
.highlight-image-wrap img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
}
.highlight-content{
  padding:22px;
  min-width:0;
}
.highlight-meta{
  color:var(--gold);
  font-size:11px;
  font-weight:850;
  letter-spacing:.02em;
  overflow-wrap:anywhere;
}
.highlight-content h3{
  margin:8px 0 10px;
  font-size:21px;
  line-height:1.22;
  letter-spacing:-.025em;
}
.highlight-excerpt{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
  overflow-wrap:anywhere;
}
.highlight-readmore{
  margin-top:16px;
  color:var(--ink);
  font-size:12px;
  font-weight:850;
}
.highlight-modal-image-wrap{
  width:100%;
  min-height:180px;
  max-height:420px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#f2f4f7;
}
.highlight-modal-image-wrap img{
  width:100%;
  max-height:420px;
  object-fit:contain;
  display:block;
}

@media(max-width:980px){
  .highlight-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .highlight-grid{grid-template-columns:1fr}
  .highlight-image-wrap{height:180px}
  .highlight-content{padding:18px}
  .highlight-content h3{font-size:19px}
}
@media(max-width:400px){
  .highlight-image-wrap{height:160px}
  .highlight-content{padding:16px}
  .highlight-content h3{font-size:18px}
  .highlight-excerpt{font-size:13px}
}


/* Clean section headers without side description */
#about .head,
#highlights .head{
  display:block;
}
#about .head > div,
#highlights .head > div{
  max-width:none;
}


/* Admin CV Builder */
.check-field{
  display:flex!important;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fafafa;
}
.check-field input{
  width:17px!important;
  height:17px;
  margin:0;
}
.cv-builder-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
}
.cv-builder-head h3{
  margin:5px 0 6px;
  font-size:28px;
}
.cv-builder-desc{
  max-width:700px;
  margin:0;
  color:var(--muted);
}
.cv-builder-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,220px));
  gap:12px;
  margin-top:24px;
}
.cv-builder-stat{
  padding:18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8f9fb;
}
.cv-builder-stat strong{
  display:block;
  font-size:28px;
  line-height:1;
}
.cv-builder-stat span{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.cv-selected-wrap{
  margin-top:24px;
}
.cv-selected-wrap h4{
  margin:0 0 10px;
}
.cv-selected-preview{
  display:grid;
  gap:8px;
}
.cv-selected-item{
  display:grid;
  grid-template-columns:85px 1fr;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
}
.cv-selected-item span{
  color:var(--gold);
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.cv-selected-item b{
  font-size:13px;
}
@media(max-width:700px){
  .cv-builder-head{
    display:block;
  }
  .cv-builder-head .smallbtn{
    margin-top:16px;
    width:100%;
  }
  .cv-builder-grid{
    grid-template-columns:1fr 1fr;
  }
}


/* =========================================================
   ADMIN MOBILE APP / HAMBURGER DRAWER
   ========================================================= */
.admin-mobile-bar,
.admin-menu-toggle,
.admin-sidebar-close,
.admin-sidebar-overlay{
  display:none;
}

@media(max-width:900px){
  .admin-body{
    overflow-x:hidden;
  }
  .admin-body.admin-drawer-open{
    overflow:hidden;
  }

  .admin-shell{
    display:block;
    min-height:100vh;
    width:100%;
  }

  .admin-mobile-bar{
    position:sticky;
    top:0;
    z-index:620;
    height:58px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:rgba(255,255,255,.96);
    border-bottom:1px solid var(--line);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  .admin-mobile-brand{
    min-width:0;
    color:var(--navy);
    font-size:17px;
    line-height:1;
    font-weight:950;
    letter-spacing:-.02em;
  }
  .admin-mobile-brand span{
    color:var(--gold);
  }
  .admin-mobile-brand small{
    margin-left:4px;
    color:#667085;
    font-size:9px;
    font-weight:850;
    letter-spacing:.12em;
  }

  .admin-menu-toggle{
    flex:0 0 42px;
    width:42px;
    height:42px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    border:1px solid var(--line);
    border-radius:11px;
    background:#fff;
    padding:0;
    box-shadow:0 3px 12px rgba(16,24,40,.04);
  }
  .admin-menu-toggle span{
    width:20px;
    height:2px;
    border-radius:99px;
    background:var(--navy);
    transition:transform .2s ease,opacity .2s ease;
  }
  .admin-menu-toggle.open span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }
  .admin-menu-toggle.open span:nth-child(2){
    opacity:0;
  }
  .admin-menu-toggle.open span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }

  .sidebar{
    position:fixed!important;
    z-index:700;
    top:0;
    left:0;
    bottom:0;
    width:min(82vw,300px);
    height:100dvh!important;
    min-height:0!important;
    padding:22px 16px 18px;
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    overscroll-behavior:contain;
    transform:translateX(-105%);
    transition:transform .26s cubic-bezier(.2,.8,.2,1);
    box-shadow:20px 0 50px rgba(15,23,42,.22);
  }
  .sidebar.mobile-open{
    transform:translateX(0);
  }
  .sidebar .logo{
    margin:4px 44px 22px 8px;
    font-size:20px;
  }
  .admin-sidebar-close{
    position:absolute;
    top:14px;
    right:13px;
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    padding:0;
    border:1px solid rgba(255,255,255,.15);
    border-radius:10px;
    background:rgba(255,255,255,.06);
    color:#fff;
    font:500 25px/1 Arial,sans-serif;
  }
  .menu{
    grid-template-columns:1fr!important;
    gap:5px;
  }
  .menu button{
    min-height:44px;
    padding:11px 13px;
    font-size:13px;
  }
  .sidebar-foot{
    position:static!important;
    grid-template-columns:1fr!important;
    margin-top:auto!important;
    padding-top:22px;
  }

  .admin-sidebar-overlay{
    position:fixed;
    z-index:680;
    inset:0;
    display:block;
    background:rgba(15,23,42,.46);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .22s ease,visibility .22s ease;
  }
  .admin-sidebar-overlay.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  .admin-main{
    max-width:none!important;
    width:100%;
    min-width:0;
    padding:20px 16px 36px!important;
  }
  .admin-head{
    margin:0 0 18px;
    align-items:flex-start;
  }
  .admin-head .eyebrow{
    font-size:9px;
  }
  .admin-head h2{
    margin-top:3px;
    font-size:27px;
    line-height:1.1;
  }
  .admin-head .pill{
    flex:0 0 auto;
    padding:6px 8px;
    font-size:9px;
  }

  .admin-section,
  .admin-card,
  .admin-grid,
  .admin-card > *,
  .field,
  .field input,
  .field textarea,
  .field select,
  .uploadline,
  .list,
  .item,
  form{
    min-width:0;
    max-width:100%;
  }

  .admin-grid,
  .admin-section[data-section="profile"] .admin-grid{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
  .admin-card{
    width:100%;
    padding:17px!important;
    border-radius:15px;
    overflow:hidden;
  }
  .admin-card h3{
    margin-bottom:16px;
    font-size:18px;
  }

  .field{
    margin-bottom:14px;
  }
  .field label{
    font-size:12px;
  }
  .field input,
  .field textarea,
  .field select{
    width:100%;
    box-sizing:border-box;
    font-size:16px; /* prevents iOS auto zoom */
    padding:11px 12px!important;
    border-radius:10px;
  }
  .field textarea{
    min-height:105px;
    resize:vertical;
  }
  .field small{
    display:block;
    margin-top:6px;
    font-size:10px;
    line-height:1.45;
  }

  .uploadline{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    width:100%;
  }
  .uploadline input[type="file"]{
    width:100%;
    overflow:hidden;
  }
  .uploadline .smallbtn{
    width:100%;
    min-height:42px;
  }

  .form-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    margin-top:12px;
  }
  .form-actions .smallbtn,
  .admin-card > .smallbtn{
    width:100%;
    min-height:42px;
  }

  .list{
    display:grid;
    gap:10px;
  }
  .item{
    width:100%;
    padding:13px!important;
    border-radius:12px;
    overflow-wrap:anywhere;
  }
  .item > div:last-child{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
  }
  .item button{
    min-height:36px;
  }

  .profile-upload-preview img,
  [data-preview] img{
    max-width:100%;
    height:auto;
  }

  .cv-builder-head{
    display:block!important;
  }
  .cv-builder-head h3{
    font-size:23px!important;
  }
  .cv-builder-desc{
    font-size:12px;
    line-height:1.55;
  }
  .cv-builder-head .smallbtn{
    width:100%!important;
    min-height:44px;
    margin-top:15px!important;
  }
  .cv-builder-grid{
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
    margin-top:18px!important;
  }
  .cv-builder-stat{
    min-width:0;
    padding:14px!important;
  }
  .cv-builder-stat strong{
    font-size:24px!important;
  }
  .cv-selected-item{
    grid-template-columns:70px 1fr!important;
    min-width:0;
    padding:10px!important;
  }
  .cv-selected-item b{
    overflow-wrap:anywhere;
  }
}

@media(max-width:430px){
  .admin-mobile-bar{
    height:56px;
    padding:0 12px;
  }
  .admin-menu-toggle{
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  .sidebar{
    width:min(86vw,292px);
  }
  .admin-main{
    padding:16px 12px 30px!important;
  }
  .admin-head{
    gap:10px;
  }
  .admin-head h2{
    font-size:24px;
  }
  .admin-head .pill{
    max-width:120px;
    white-space:normal;
    text-align:center;
    line-height:1.2;
  }
  .admin-card{
    padding:15px!important;
    border-radius:14px;
  }
  .login-wrap{
    padding:14px!important;
  }
  .login-card{
    padding:22px 17px!important;
    border-radius:17px!important;
  }
  .login-card h1{
    font-size:26px!important;
  }
  .cv-builder-grid{
    grid-template-columns:1fr!important;
  }
  .cv-selected-item{
    grid-template-columns:1fr!important;
    gap:3px!important;
  }
}

@media(max-width:370px){
  .admin-main{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .admin-mobile-brand{
    font-size:16px;
  }
  .admin-mobile-brand small{
    font-size:8px;
  }
  .admin-head h2{
    font-size:22px;
  }
  .admin-head .pill{
    font-size:8px;
  }
}


/* =========================================================
   PUBLIC MOBILE NAV — MATCH ADMIN CLEAN HAMBURGER
   ========================================================= */
.public-mobile-overlay,
.public-mobile-close,
.public-mobile-drawer-brand{
  display:none;
}

@media(max-width:900px){
  body.public-drawer-open{
    overflow:hidden;
  }

  nav{
    z-index:610;
  }

  .nav{
    height:58px;
  }

  .mobile-menu-btn{
    flex:0 0 42px;
    width:42px;
    height:42px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    margin-left:auto;
    padding:0;
    border:1px solid var(--line);
    border-radius:11px;
    background:#fff;
    box-shadow:0 3px 12px rgba(16,24,40,.04);
  }
  .mobile-menu-btn span{
    width:20px;
    height:2px;
    border-radius:99px;
    background:var(--navy);
  }

  /* Keep hamburger as hamburger while drawer is open.
     The drawer already has its own close X button. */
  .mobile-menu-btn.open span:nth-child(1),
  .mobile-menu-btn.open span:nth-child(3){
    transform:none;
  }
  .mobile-menu-btn.open span:nth-child(2){
    opacity:1;
  }

  .mobile-menu.public-mobile-drawer{
    position:fixed;
    z-index:700;
    top:0;
    left:0;
    bottom:0;
    width:min(82vw,300px);
    height:100dvh;
    max-height:none;
    display:flex;
    flex-direction:column;
    padding:22px 16px 18px;
    overflow-y:auto;
    overscroll-behavior:contain;
    opacity:1;
    visibility:visible;
    background:var(--navy);
    border:0;
    transform:translateX(-105%);
    transition:transform .26s cubic-bezier(.2,.8,.2,1);
    box-shadow:20px 0 50px rgba(15,23,42,.22);
  }
  .mobile-menu.public-mobile-drawer.open{
    max-height:none;
    transform:translateX(0);
  }

  .public-mobile-close{
    position:absolute;
    top:14px;
    right:13px;
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid rgba(255,255,255,.15);
    border-radius:10px;
    background:rgba(255,255,255,.06);
    color:#fff;
    font:500 25px/1 Arial,sans-serif;
  }

  .public-mobile-drawer-brand{
    display:block;
    margin:4px 44px 22px 8px;
    color:#fff;
    font-size:20px;
    line-height:1;
    font-weight:950;
    letter-spacing:-.03em;
  }
  .public-mobile-drawer-brand span{
    color:var(--gold);
  }

  .mobile-menu-inner{
    display:grid;
    gap:5px;
    padding:0;
  }
  .mobile-menu-inner a{
    min-height:44px;
    display:flex;
    align-items:center;
    padding:11px 13px;
    border:0;
    border-radius:10px;
    color:#d7deea;
    font-size:13px;
    font-weight:800;
  }
  .mobile-menu-inner a:hover,
  .mobile-menu-inner a:focus-visible{
    color:#fff;
    background:rgba(255,255,255,.08);
  }

  .public-mobile-overlay{
    position:fixed;
    z-index:680;
    inset:0;
    display:block;
    background:rgba(15,23,42,.46);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .22s ease,visibility .22s ease;
  }
  .public-mobile-overlay.show{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
}

@media(max-width:430px){
  .nav{
    height:56px;
  }
  .mobile-menu-btn{
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  .mobile-menu.public-mobile-drawer{
    width:min(86vw,292px);
  }
}


/* =========================================================
   MULTI IMAGE UPLOAD + PUBLIC GALLERY
   ========================================================= */
.multi-image-url-field{
  min-height:92px!important;
}
.multi-image-preview{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:10px 0 4px;
}
.multi-image-thumb{
  position:relative;
  aspect-ratio:1/1;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f2f4f7;
}
.multi-image-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.multi-image-thumb span{
  position:absolute;
  right:5px;
  bottom:5px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(15,23,42,.82);
  color:#fff;
  font-size:9px;
  font-weight:850;
}

.project-image-wrap,
.highlight-image-wrap{
  position:relative;
}
.image-count-badge{
  position:absolute;
  right:10px;
  bottom:10px;
  z-index:2;
  padding:6px 8px;
  border-radius:999px;
  background:rgba(15,23,42,.84);
  color:#fff;
  font-size:10px;
  line-height:1;
  font-weight:850;
  backdrop-filter:blur(8px);
}
.project-card-clickable{
  cursor:pointer;
}
.project-card-clickable:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}

.detail-gallery-shell{
  position:relative;
}
.detail-gallery-shell.has-controls{
  padding:0 46px;
}
.detail-gallery-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  width:38px;
  height:38px;
  border:none;
  border-radius:999px;
  background:rgba(15,23,42,.88);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}
.detail-gallery-nav.prev{ left:10px; }
.detail-gallery-nav.next{ right:10px; }
.detail-gallery-nav:hover{
  background:rgba(15,23,42,.96);
}

.detail-gallery{
  display:flex;
  overflow-x:auto;
  overflow-y:hidden;
  gap:12px;
  padding:12px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.detail-gallery::-webkit-scrollbar{
  display:none;
}
.detail-gallery.single{
  overflow:visible;
}
.detail-gallery-item{
  position:relative;
  flex:0 0 100%;
  margin:0;
  min-width:0;
  overflow:hidden;
  border-radius:14px;
  background:#f2f4f7;
  scroll-snap-align:start;
}
.detail-gallery-item img{
  width:100%;
  height:auto;
  max-height:72vh;
  display:block;
  object-fit:contain;
  background:#f2f4f7;
}
.detail-gallery-caption{
  position:absolute;
  right:10px;
  bottom:10px;
  margin:0;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(15,23,42,.82);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
}
.project-modal-gallery{
  background:#f2f4f7;
}
#projectModalTags{
  margin-top:16px;
}

@media(max-width:620px){
  .detail-gallery-shell.has-controls{
    padding:0 38px;
  }
  .detail-gallery-nav{
    width:34px;
    height:34px;
    font-size:24px;
  }
  .detail-gallery-nav.prev{ left:6px; }
  .detail-gallery-nav.next{ right:6px; }
  .multi-image-preview{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .detail-gallery-item img{
    max-height:58vh;
  }
}
@media(max-width:400px){
  .multi-image-preview{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .detail-gallery{
    gap:10px;
    padding:10px;
  }
}



/* Ensure gallery arrows are always clickable above modal content */
.detail-gallery-shell{ position:relative; isolation:isolate; }
.detail-gallery-nav{
  z-index:20!important;
  pointer-events:auto!important;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
}
.detail-gallery{ position:relative; z-index:1; }


/* =========================================================
   CLEAN GALLERY ARROWS — invisible hit area, chevron only
   ========================================================= */
.detail-gallery-shell.has-controls{
  padding-left:34px;
  padding-right:34px;
}
.detail-gallery-nav{
  width:44px!important;
  height:56px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#202938!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:38px!important;
  font-weight:400!important;
  line-height:1!important;
  opacity:.78;
  transition:opacity .16s ease,transform .16s ease,color .16s ease;
}
.detail-gallery-nav.prev{ left:0!important; }
.detail-gallery-nav.next{ right:0!important; }
.detail-gallery-nav:hover,
.detail-gallery-nav:focus-visible{
  background:transparent!important;
  color:#0f172a!important;
  opacity:1;
  outline:none;
}
.detail-gallery-nav:hover{
  transform:translateY(-50%) scale(1.08);
}
.detail-gallery-nav:active{
  transform:translateY(-50%) scale(.94);
}
@media(max-width:620px){
  .detail-gallery-shell.has-controls{
    padding-left:28px;
    padding-right:28px;
  }
  .detail-gallery-nav{
    width:40px!important;
    height:52px!important;
    font-size:34px!important;
    opacity:.82;
  }
}
