/*
  HRM Public Directory Stylesheet
  - CSS สำหรับหน้า public directory ของบุคลากรภายนอก
  - โทนทางการ/สถาบัน: กรมท่า (navy) + ทอง ตามอัตลักษณ์คณะ แต่ปรับให้โค้งมนขึ้น เงานุ่มขึ้น ลดความแข็งกระด้าง
  - คุม hero, toolbar, group tabs, department sub-tabs, person cards, profile detail และ responsive
*/

/* ฟอนต์ Noto Sans Thai ย้ายไปโหลดผ่าน <link> ใน index.html แทน @import เพื่อให้เบราว์เซอร์ดึงพร้อมกับ CSS/JS
   ได้เลยตั้งแต่ parse head แรก ไม่ต้องรอ public.css โหลดเสร็จก่อนถึงจะเห็น request ฟอนต์ */

:root{
  /* โทนหลักของสถาบัน */
  --navy:#0d2b4c;
  --navy2:#123a63;
  --navy-deep:#081a2e;
  --gold:#c19a34;
  --gold-deep:#8f6d15;
  --gold-soft:#f5edd6;

  --bg:#f5f6f9;
  --text:#232c38;
  --muted:#5f6875;
  --line:#e2e6ec;
  --line-strong:#cdd4dc;
  --white:#fff;
  --panel:#ffffff;
  --panel-alt:#f2f4f8;

  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:20px;

  --shadow-sm:0 2px 8px rgba(13,43,76,.06);
  --shadow-md:0 8px 22px rgba(13,43,76,.09);
  --shadow-lg:0 18px 40px rgba(13,43,76,.14);
}

*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font-family:'Noto Sans Thai',sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}

.hidden{display:none!important}

/* ---------- Hero ---------- */

/* พื้นกรมไล่สีให้มีมิติ แทนสีกรมเรียบล้วน */
.public-hero{
  position:sticky;
  top:0;
  z-index:40;
  color:white;
  overflow:hidden;
  background:linear-gradient(160deg,var(--navy2) 0%,var(--navy) 42%,var(--navy-deep) 100%);
}

/* เส้นคั่นสองชั้น: เส้นเหลืองทองทึบบาง ๆ ซ้อนบนเส้นทองไล่ระดับ ให้ดูมีมิติ */
.hero-shade{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:linear-gradient(90deg,transparent,var(--gold) 50%,transparent);
}

.hero-shade::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-2px;
  height:2px;
  background:linear-gradient(90deg,transparent,#f0c94d 18%,#f0c94d 82%,transparent);
}

.public-nav{
  position:relative;
  z-index:1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  max-width:1180px;
  margin:0 auto;
  padding:9px 24px 5px;
}

/* ปุ่ม MIS ย้ายมาอยู่แถวเดียวกับ directory-head (พื้นหลังสว่าง) จึงใช้สไตล์เข้มแทนขาวโปร่งแบบตอนอยู่ใน header เข้ม */
.directory-head .public-nav-actions a{
  color:var(--navy);
  text-decoration:none;
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.2px;
  padding:7px 14px;
  border:1px solid var(--line-strong);
  border-radius:999px;
  background:var(--white);
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}

.directory-head .public-nav-actions a:hover{
  background:var(--panel-alt);
  border-color:var(--navy2);
  color:var(--navy2);
}

.public-nav-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.nav-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-mark{
  width:42px;
  height:42px;
  border-radius:0;
  background:transparent;
  object-fit:contain;
  padding:0;
}

/* บล็อกข้อความ 2 บรรทัดข้างโลโก้: บรรทัดชิดกัน ไม่บังคับสูงเท่าโลโก้แล้ว */
.brand-text{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:1px;
}

.brand-text-th{
  color:white;
  font-weight:800;
  font-size:15px;
  line-height:1;
  letter-spacing:.2px;
  white-space:nowrap;
}

.brand-text-sub{
  color:#cdd8ea;
  font-weight:600;
  font-size:11px;
  line-height:1;
  letter-spacing:1.6px;
  white-space:nowrap;
}

.hero-content{
  position:relative;
  z-index:1;
  max-width:1180px;
  margin:0 auto;
  padding:4px 24px 12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.hero-content p{
  margin:0 0 8px;
  color:var(--gold-soft);
  font-weight:700;
  font-size:13px;
  letter-spacing:.4px;
}

.hero-content h1{
  margin:0;
  max-width:720px;
  font-size:24px;
  font-weight:800;
  line-height:1.4;
  letter-spacing:.1px;
}

.hero-content span{
  display:block;
  max-width:640px;
  margin-top:10px;
  color:#e4ecf5;
  font-size:14px;
  line-height:1.65;
}

/* ---------- Layout ---------- */

.public-main{
  flex:1 0 auto;
  width:min(100%,1280px);
  max-width:1280px;
  margin:12px auto 48px;
  padding:0 24px;
  position:relative;
  z-index:2;
}
.academic-embed-main{
  margin-top:0;
  margin-bottom:24px;
}

.public-footer{
  flex:0 0 auto;
  margin:0 auto;
  padding:18px 24px 24px;
  width:100%;
  max-width:1180px;
  border-top:1px solid var(--line);
  color:var(--muted);
  text-align:center;
  font-size:12.5px;
  line-height:1.5;
}

/* ---------- Toolbar ---------- */

.directory-panel{
  display:block;
}

.directory-control{
  display:flex;
  flex-direction:column;
  gap:12px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  box-shadow:none;
  margin-bottom:18px;
  padding:4px 0 16px;
}

.directory-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.directory-title{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
}

.directory-head h2{
  margin:0;
  color:var(--navy);
  font-size:18px;
  font-weight:800;
  line-height:1.25;
}

.directory-head p{
  margin:0;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.45;
}

#resultSummary.is-busy{
  color:var(--navy);
  font-weight:700;
}

#resultSummary.is-busy::before{
  content:"";
  display:inline-block;
  width:13px;
  height:13px;
  margin-right:8px;
  border:2px solid rgba(13,43,76,.18);
  border-top-color:var(--gold);
  border-radius:50%;
  vertical-align:-2px;
  animation:publicSpin .75s linear infinite;
}

@keyframes publicSpin{
  to{transform:rotate(360deg)}
}

/* Overlay ฟรีซจอตอนกดเปิด/กลับหน้าโปรไฟล์ ให้เห็นชัดว่ากำลังโหลด */
.loading-overlay{
  position:fixed;
  inset:0;
  z-index:80;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(245,246,249,.85);
  backdrop-filter:blur(2px);
}

.loading-overlay-box{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 24px;
  border-radius:var(--radius-lg);
  background:var(--white);
  border:1px solid var(--line);
  box-shadow:var(--shadow-lg);
  color:var(--navy);
  font-weight:700;
  font-size:15px;
}

.loading-spinner{
  width:20px;
  height:20px;
  flex:0 0 auto;
  border:3px solid rgba(13,43,76,.15);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:publicSpin .65s linear infinite;
}

.group-chooser{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  padding:5px;
  background:var(--panel-alt);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
}

.group-choice{
  border:0;
  border-radius:var(--radius-md);
  padding:12px 12px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  text-align:center;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease;
}

.group-choice span{
  color:inherit;
  font-weight:700;
  font-size:14.5px;
  line-height:1.2;
}

.group-choice b{
  font-size:12px;
  font-weight:800;
  color:var(--navy);
  background:var(--panel-alt);
  border-radius:999px;
  padding:2px 8px;
  min-width:20px;
  line-height:1.55;
}

.group-choice:hover,
.group-choice:focus-visible{
  background:rgba(255,255,255,.7);
  color:var(--navy);
  outline:none;
}

.group-choice.active{
  background:var(--white);
  color:var(--navy);
  box-shadow:var(--shadow-sm);
  position:relative;
}

.group-choice.active::after{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  bottom:-6px;
  height:3px;
  border-radius:3px;
  background:var(--gold);
}

.group-choice.active b{
  background:var(--gold-soft);
  color:var(--gold-deep);
}

/* แท็บย่อยกลุ่มวิชา ใช้หน้าตาใกล้กับ group-chooser และแสดงเมื่อเลือกสายวิชาการ */
.department-tabs{
  display:grid;
  grid-template-columns:auto repeat(6,minmax(0,1fr));
  align-items:center;
  gap:6px;
  padding:5px;
  background:var(--panel-alt);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
}

.department-tabs-label{
  padding:0 10px;
  color:var(--navy);
  font-size:13px;
  font-weight:800;
  line-height:1.4;
  white-space:nowrap;
}

.department-tab{
  min-height:44px;
  border:0;
  border-radius:var(--radius-md);
  padding:9px 10px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:12.5px;
  font-weight:700;
  line-height:1.35;
  cursor:pointer;
  text-align:center;
  position:relative;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease;
}

.department-tab:hover,
.department-tab:focus-visible{
  background:rgba(255,255,255,.7);
  color:var(--navy);
  outline:none;
}

.department-tab.active{
  background:var(--white);
  color:var(--navy);
  box-shadow:var(--shadow-sm);
}

.department-tab.active::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:-6px;
  height:3px;
  border-radius:3px;
  background:var(--gold);
}

.public-filters{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

select,
input{
  width:100%;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  padding:11px 14px;
  font:inherit;
  font-size:14.5px;
  background:var(--white);
  color:var(--text);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}

select:focus,
input:focus{
  border-color:var(--navy2);
  box-shadow:0 0 0 3px rgba(18,58,99,.14);
}

input::placeholder{
  color:#8b93a0;
}

/* ---------- Cards ---------- */

/* ขนาดการ์ดในหน้ารวม (สายวิชาการ/สายสนับสนุน) เท่ากับแถวที่ 3 ของคณะผู้บริหาร (220–260px) แทนการยืดเต็ม 3 คอลัมน์ */
.profile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,260px));
  justify-content:center;
  gap:14px;
  min-width:0;
  transition:opacity .16s ease, filter .16s ease;
}

.profile-grid.is-updating{
  opacity:.55;
  filter:saturate(.85);
  pointer-events:none;
}

.group-heading{
  grid-column:1 / -1;
  margin:14px 0 2px;
  padding:8px 2px;
  border-radius:0;
  border-bottom:2px solid var(--line-strong);
  background:transparent;
  color:var(--navy);
  font-weight:800;
  font-size:16px;
  line-height:1.35;
}

.group-heading.executive-group{
  text-align:center;
  font-size:27px;
  margin:6px 0 22px;
  color:var(--gold-deep);
}

.group-heading.support-executive-group{
  text-align:center;
  border-bottom:0;
  border-top:1px solid var(--line);
  padding-top:18px;
  margin:20px auto 4px;
  width:min(620px,100%);
  font-size:27px;
  color:var(--gold-deep);
}

.group-heading.academic-group,
.group-heading.support-group{
  text-align:center;
  font-size:21px;
}

.executive-layout{
  grid-column:1 / -1;
  display:grid;
  gap:14px;
}

.executive-dean-row{
  display:flex;
  justify-content:center;
}

.executive-second-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(220px,1fr));
  gap:14px;
  max-width:960px;
  width:100%;
  justify-self:center;
}

.executive-third-row{
  display:grid;
  grid-template-columns:repeat(5,minmax(180px,1fr));
  gap:14px;
  max-width:1280px;
  width:100%;
  justify-self:center;
}

.executive-rest-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  max-width:1280px;
  width:100%;
  justify-self:center;
}

.executive-rest-row .person-card{
  flex:1 1 220px;
  max-width:260px;
}

/* การ์ดหรูหรา: ไม่มีเส้นขอบรอบ ไม่ไล่สี มีเพียงเส้นทึบสีกรมด้านซ้ายด้านเดียว + เงาการ์ดปกติ (ไม่เรืองแสง) */
.person-card,
.loading-card{
  border:0;
  border-left:4px solid var(--navy);
  border-radius:var(--radius-lg);
  background:var(--panel);
  padding:16px;
  box-shadow:var(--shadow-sm);
}

.person-card{
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  display:flex;
  flex-direction:column;
  min-height:330px;
}

/* กรอบสีทอง/ไล่สีของผู้บริหารยังใช้ได้ทุกที่เพื่อบอกสถานะ แต่ขนาดรูป/การ์ดที่ใหญ่กว่าฐาน (เช่นของคณบดี)
   ต้อง "ใหญ่ขึ้น" เฉพาะตอนอยู่ในหน้าคณะผู้บริหารจริงๆ (executive-group / support-executive-group) เท่านั้น
   ถ้าคนคนเดียวกันไปโผล่ในหน้าสายวิชาการแบบรวม (academic-group) ต้องมีขนาดเท่าเพื่อนร่วมแถว */
/* การ์ดผู้บริหาร: พื้นขาวเหมือนการ์ดทั่วไป เส้นซ้ายเปลี่ยนเป็นทอง และเงาการ์ดปกติ ไม่เรืองแสง */
.person-card.is-executive{
  border-left-color:var(--gold);
  box-shadow:var(--shadow-sm);
}

.person-card.is-executive:hover{
  border-left-color:var(--gold);
  box-shadow:var(--shadow-md);
}

.person-card.is-dean{
  border-left-color:var(--gold);
  box-shadow:var(--shadow-md);
}

.person-card.executive-group.is-dean{
  max-width:600px;
  width:100%;
  padding:18px;
  min-height:390px;
}

.person-card.is-support-executive{
  grid-column:1 / -1;
  justify-self:center;
}

.person-card.support-executive-group.is-support-executive{
  max-width:600px;
  width:100%;
  padding:18px;
  min-height:390px;
}

.person-card:hover{
  transform:translateY(-2px);
  border-left-color:var(--navy2);
  box-shadow:var(--shadow-md);
}

.person-card.is-executive:hover,
.person-card.is-dean:hover{
  border-left-color:var(--gold);
}

.person-card:active{
  transform:translateY(0);
}

.group-choice:active{
  background:rgba(255,255,255,.85);
}

/* การ์ดบุคลากรทุกคนใช้ layout เดียวกัน: รูปอยู่กึ่งกลางด้านบน ข้อความ/แท็กอยู่ใต้ภาพ จัดกึ่งกลางทั้งหมด
   (เดิมแยกสไตล์เฉพาะผู้บริหาร แต่พอขึ้นพร้อมกันในกลุ่มเดียวกันแล้วดูไม่สมดุล เลยรวมเป็นแบบเดียว) */
.person-top{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:12px;
  min-width:0;
  flex:1;
}

.person-content{
  min-width:0;
  display:flex;
  flex:1;
  align-self:stretch;
  flex-direction:column;
  align-items:center;
  width:100%;
}

.person-photo{
  width:128px;
  height:162px;
  border-radius:var(--radius-md);
  object-fit:cover;
  border:2px solid var(--white);
  background:var(--white);
  box-shadow:var(--shadow-sm);
  flex:0 0 auto;
}

.person-name{
  margin:0;
  color:var(--navy);
  font-size:16px;
  font-weight:700;
  line-height:1.35;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  text-wrap:balance;
}

.person-card.executive-group.is-dean .person-name,
.person-card.support-executive-group.is-support-executive .person-name{
  font-size:18px;
}

.person-card.executive-group.is-dean .person-photo,
.person-card.support-executive-group.is-support-executive .person-photo{
  width:168px;
  height:214px;
}

.person-role{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.is-loading-text{
  color:#9a7620!important;
  font-style:italic;
  font-weight:600;
}

.person-meta{
  margin-top:10px;
  display:grid;
  justify-items:center;
  gap:5px;
  color:#3a4250;
  font-size:12.5px;
  line-height:1.5;
}

.person-meta span{
  overflow-wrap:break-word;
}

.tag-row{
  display:flex;
  justify-content:center;
  gap:6px;
  flex-wrap:wrap;
  margin-top:auto;
  padding-top:12px;
}

.tag{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 10px;
  background:var(--panel-alt);
  color:var(--navy);
  font-weight:700;
  font-size:11.5px;
  line-height:1.3;
}

.skeleton-card{
  min-height:150px;
  color:transparent;
  background:
    linear-gradient(90deg,rgba(238,241,245,.9),rgba(255,255,255,.96),rgba(238,241,245,.9));
  background-size:220% 100%;
  animation:publicSkeleton 1.1s ease-in-out infinite;
}

@keyframes publicSkeleton{
  0%{background-position:120% 0}
  100%{background-position:-120% 0}
}

/* ---------- Profile detail ---------- */

.profile-detail{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  padding:22px;
  box-shadow:var(--shadow-md);
}

.profile-page-head{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:18px;
}

.profile-page-head span{
  display:block;
  color:var(--muted);
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.2px;
  margin-bottom:2px;
}

.profile-page-head h2{
  margin:0;
  color:var(--navy);
  font-size:26px;
  font-weight:800;
}

.back-button{
  border:0;
  border-radius:var(--radius-md);
  padding:12px 18px;
  background:var(--navy);
  color:white;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:background .18s ease;
}

.back-button:hover{
  background:var(--navy2);
}

.profile-modal{
  display:block;
}

.profile-content{
  min-width:0;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  overflow:visible;
}

.profile-banner{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:26px;
  align-items:center;
  padding:28px;
  border-bottom:1px solid var(--line);
  background:
    radial-gradient(circle at 94% 12%,rgba(193,154,52,.14),transparent 30%),
    linear-gradient(135deg,var(--panel-alt),#ffffff);
}

.profile-banner img{
  width:180px;
  height:226px;
  object-fit:cover;
  border-radius:var(--radius-lg);
  border:5px solid white;
  background:white;
  box-shadow:var(--shadow-lg);
}

.profile-banner h2{
  margin:0 0 6px;
  color:var(--navy);
  font-size:26px;
  font-weight:800;
}

.profile-banner p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}

.profile-banner-info{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px 18px;
  margin:12px 0 14px;
}

.profile-banner-info .info-item{
  padding:0;
  border-bottom:0;
}

.profile-banner-info .info-label{
  color:var(--muted);
}

.profile-banner-info .info-value{
  color:var(--text);
  font-weight:700;
}

.profile-banner button{
  border:0;
  border-radius:var(--radius-md);
  padding:10px 16px;
  background:var(--navy);
  color:white;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.profile-body{
  display:grid;
  grid-template-columns:210px minmax(0,1fr);
  gap:24px;
  align-items:stretch;
  padding:22px;
}

.profile-section-tabs{
  position:sticky;
  top:24px;
  align-self:start;
  height:max-content;
  max-height:none;
  overflow:visible;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--panel-alt);
}

.profile-scroll{
  min-width:0;
  padding:0;
  max-height:none;
  overflow:visible;
  scroll-behavior:smooth;
  scroll-padding-top:12px;
}

.side-tab{
  width:100%;
  border:0;
  border-radius:var(--radius-md);
  padding:12px 14px;
  margin-bottom:0;
  background:transparent;
  color:var(--navy);
  font:inherit;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  text-align:left;
  transition:background .18s ease, color .18s ease;
}

.side-tab.active,
.side-tab:hover{
  background:var(--navy);
  color:white;
}

.profile-section{
  padding:18px 0;
  border-bottom:1px solid var(--line);
}

.profile-section:first-child{
  padding-top:0;
}

.profile-section:last-child{
  border-bottom:0;
}

.profile-section h3{
  margin:0 0 12px;
  color:var(--navy);
  font-size:19px;
  font-weight:800;
}

.profile-section-toggle{
  display:block;
}

.profile-section-toggle summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  background:linear-gradient(135deg,#fff,var(--panel-alt));
  color:var(--navy);
  font-size:17px;
  font-weight:800;
}

.profile-section-toggle summary::-webkit-details-marker{
  display:none;
}

.profile-section-toggle summary::after{
  content:"ยุบ";
  color:var(--muted);
  font-size:12.5px;
  font-weight:700;
}

.profile-section-toggle:not([open]) summary::after{
  content:"แสดง";
}

.profile-section-toggle summary b{
  color:var(--gold-deep);
  font-size:13px;
  margin-left:auto;
}

.profile-section-toggle[open] > :not(summary){
  margin-top:18px;
}

.section-kicker{
  margin:-4px 0 18px;
  color:var(--muted);
}

.info-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 28px;
}

.education-list,
.experience-list,
.research-list{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding-left:34px;
}

.education-list::before,
.experience-list::before,
.research-list::before{
  content:"";
  position:absolute;
  left:14px;
  top:8px;
  bottom:8px;
  width:2px;
  background:var(--gold-soft);
}

.education-entry,
.experience-entry,
.research-entry{
  position:relative;
  display:grid;
  grid-template-columns:36px 1fr;
  gap:14px;
  margin-left:-34px;
}

.education-icon,
.experience-icon,
.research-icon{
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--gold);
  color:#2a1e05;
  font-weight:800;
  font-size:14px;
  box-shadow:0 6px 16px rgba(193,154,52,.3);
  z-index:1;
}

.education-card,
.experience-card,
.research-card{
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  background:white;
  box-shadow:var(--shadow-sm);
}

.degree-pill,
.experience-pill,
.research-pill{
  display:inline-flex;
  max-width:100%;
  padding:5px 11px;
  border-radius:8px;
  background:var(--gold-soft);
  color:var(--gold-deep);
  font-weight:700;
  font-size:13px;
  line-height:1.45;
}

.education-line{
  margin-top:9px;
  color:var(--text);
  line-height:1.65;
}

.education-year{
  margin-top:8px;
  color:#4a4360;
  font-weight:700;
  font-size:13.5px;
}

.experience-text{
  margin-top:9px;
  color:var(--text);
  line-height:1.75;
  white-space:pre-wrap;
}

.research-heading{
  display:block;
  margin-top:9px;
  color:var(--navy);
  font-weight:700;
  line-height:1.6;
}

.research-meta,
.research-fund{
  margin-top:5px;
  color:var(--muted);
  line-height:1.6;
  font-size:13.5px;
}

.research-link{
  display:inline-flex;
  margin-top:10px;
  color:var(--navy2);
  font-weight:700;
  text-decoration:none;
}

.research-link:hover{
  color:var(--gold-deep);
}

.info-item{
  padding:10px 0 12px;
  border-bottom:1px solid var(--line);
}

.info-label{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  margin-bottom:4px;
}

.info-value{
  line-height:1.65;
  white-space:pre-wrap;
}

/* ---------- Responsive ---------- */

@media (max-width:1200px){
  .profile-grid{
    grid-template-columns:repeat(auto-fill,minmax(220px,260px));
  }
}

@media (max-width:900px){
  .hero-content h1{font-size:20px}
  .public-main{
    max-width:1180px;
  }
  .directory-control{
    padding:4px 0 14px;
    margin-bottom:16px;
  }
  .group-chooser{grid-template-columns:repeat(3,minmax(0,1fr))}
  .group-choice{flex-direction:column;gap:4px;padding:10px 6px}
  .group-choice span{font-size:13.5px}
  .department-tabs{
    grid-template-columns:1fr;
  }
  .department-tabs-label{
    padding:6px 8px 2px;
    text-align:center;
  }
  .profile-grid{grid-template-columns:1fr}
  .executive-second-row{
    grid-template-columns:1fr;
  }
  .executive-rest-row .person-card{
    flex:1 1 100%;
    max-width:420px;
  }
  .group-heading.executive-group,
  .group-heading.support-executive-group{font-size:22px}
  .group-heading.academic-group,
  .group-heading.support-group{font-size:18px}
  .profile-detail{padding:14px}
  .profile-page-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .profile-modal{
    display:block;
  }
  .profile-banner{
    grid-template-columns:110px 1fr;
    gap:16px;
    padding:18px;
  }
  .profile-banner img{
    width:110px;
    height:140px;
  }
  .profile-banner-info{
    grid-template-columns:1fr;
    gap:8px;
    margin:10px 0 12px;
  }
  .profile-body{
    grid-template-columns:1fr;
    padding:14px;
  }
  .profile-section-tabs{
    position:static;
    max-height:none;
    overflow:auto;
    flex-direction:row;
    padding:8px;
  }
  .side-tab{
    width:auto;
    flex:0 0 auto;
  }
  .person-top{
    align-items:center;
  }
  .person-photo{
    width:108px;
    height:138px;
  }
  .person-card.executive-group.is-dean .person-photo,
  .person-card.support-executive-group.is-support-executive .person-photo{
    width:140px;
    height:178px;
  }
  .info-grid{grid-template-columns:1fr}
}

@media (max-width:520px){
  .public-nav{padding:8px 16px 4px}
  .hero-content{padding:0 16px 10px}
  .public-main{padding:0 16px}
  .directory-head{flex-direction:column;align-items:flex-start}
  .directory-head .public-nav-actions{justify-content:flex-start}
}
