/*
Theme Name: HNUE Physics Next
Theme URI: https://phys.hgdvl.com/
Author: Faculty of Physics - HNUE
Description: Modern bilingual-ready theme for the Faculty of Physics, Hanoi National University of Education. Designed to preserve legacy WordPress content, Staff List and Participants Database data while providing a modern research-university experience.
Version: 0.9.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: hnue-physics-next
*/

:root{
  --hnue-blue:#0064B4;--hnue-sky:#00A0F0;--hnue-ink:#10243e;--hnue-muted:#5f7185;
  --hnue-bg:#f5f8fb;--hnue-card:#fff;--hnue-line:#dbe6ef;--hnue-accent:#0a78ca;
  --hnue-max:1240px;--hnue-radius:18px;--hnue-shadow:0 14px 34px rgba(16,36,62,.08);
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--hnue-ink);background:#fff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;line-height:1.65}img{max-width:100%;height:auto}a{color:var(--hnue-blue);text-decoration:none}a:hover{text-decoration:underline}.container{width:min(calc(100% - 40px),var(--hnue-max));margin:auto}.skip-link{position:absolute;left:-9999px}.skip-link:focus{left:16px;top:16px;z-index:10000;background:#fff;padding:10px 14px;border-radius:8px}
.site-header{position:sticky;top:0;z-index:999;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid rgba(219,230,239,.8)}.utility{background:var(--hnue-ink);color:#fff;font-size:.86rem}.utility .container{display:flex;justify-content:space-between;align-items:center;min-height:36px}.utility a{color:#fff;opacity:.92}.brand-row{display:flex;align-items:center;gap:16px;padding:16px 0}.site-logo img{max-height:58px;width:auto}.brand-title{display:flex;flex-direction:column}.brand-title strong{font-size:1.15rem;letter-spacing:.01em}.brand-title span{font-size:.82rem;color:var(--hnue-muted)}.nav-wrap{margin-left:auto;display:flex;align-items:center;gap:12px}.primary-nav ul{list-style:none;display:flex;align-items:center;gap:24px;margin:0;padding:0}.primary-nav li{position:relative}.primary-nav a{font-weight:650;color:var(--hnue-ink);font-size:.95rem}.primary-nav .sub-menu{display:none;position:absolute;top:100%;left:0;min-width:240px;padding:12px;background:#fff;border:1px solid var(--hnue-line);border-radius:12px;box-shadow:var(--hnue-shadow)}.primary-nav li:hover>.sub-menu,.primary-nav li:focus-within>.sub-menu{display:block}.primary-nav .sub-menu li{padding:7px 4px}.lang-switcher{display:flex;gap:6px}.lang-switcher a{padding:7px 9px;border:1px solid var(--hnue-line);border-radius:9px;font-size:.82rem;font-weight:700}.menu-toggle{display:none;background:#fff;border:1px solid var(--hnue-line);border-radius:10px;padding:8px 10px}
.hero{position:relative;min-height:520px;display:flex;align-items:flex-end;color:#fff;background:#173a5f center/cover no-repeat}.hero:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,28,51,.87),rgba(7,28,51,.42) 58%,rgba(7,28,51,.12))}.hero-inner{position:relative;padding:84px 0 70px;max-width:820px}.eyebrow{display:inline-flex;align-items:center;gap:8px;text-transform:uppercase;font-size:.78rem;font-weight:800;letter-spacing:.12em}.hero h1{font-size:clamp(2.5rem,6vw,5.1rem);line-height:1.03;margin:.3em 0 .25em;max-width:850px}.hero p{font-size:1.17rem;max-width:720px;color:rgba(255,255,255,.9)}.btns{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}.btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border-radius:12px;font-weight:750;border:1px solid transparent}.btn-primary{background:#fff;color:var(--hnue-ink)}.btn-secondary{border-color:rgba(255,255,255,.55);color:#fff;background:rgba(255,255,255,.08)}
.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:-42px;position:relative;z-index:2}.quick-card{background:#fff;border:1px solid var(--hnue-line);border-radius:var(--hnue-radius);padding:24px;box-shadow:var(--hnue-shadow);min-height:150px}.quick-card strong{display:block;font-size:1.18rem;margin:8px 0}.quick-card p{margin:0;color:var(--hnue-muted);font-size:.93rem}.quick-icon{font-size:1.6rem}
.section{padding:72px 0}.section.alt{background:var(--hnue-bg)}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:28px}.section-head h2{font-size:clamp(1.8rem,3vw,2.7rem);margin:0;line-height:1.12}.section-head p{margin:8px 0 0;color:var(--hnue-muted);max-width:700px}.news-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:18px}.post-card{background:#fff;border:1px solid var(--hnue-line);border-radius:var(--hnue-radius);overflow:hidden;display:flex;flex-direction:column}.post-thumb{aspect-ratio:16/10;background:#e7eef5;overflow:hidden}.post-thumb img{width:100%;height:100%;object-fit:cover;transition:.35s}.post-card:hover .post-thumb img{transform:scale(1.025)}.post-body{padding:20px}.post-meta{font-size:.78rem;color:var(--hnue-muted);text-transform:uppercase;letter-spacing:.05em}.post-card h3{font-size:1.15rem;line-height:1.35;margin:8px 0}.post-card.featured h3{font-size:1.55rem}.post-card p{color:var(--hnue-muted);font-size:.94rem}.pillar-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.pillar{border-radius:var(--hnue-radius);padding:30px;background:linear-gradient(135deg,#073c68,#0064b4);color:#fff;min-height:230px;position:relative;overflow:hidden}.pillar:nth-child(2){background:linear-gradient(135deg,#064b74,#00a0f0)}.pillar:nth-child(3){background:linear-gradient(135deg,#0c334f,#2d6f91)}.pillar h3{font-size:1.5rem;margin:0 0 10px}.pillar p{color:rgba(255,255,255,.88)}.pillar a{color:#fff;font-weight:750}.events-layout{display:grid;grid-template-columns:.9fr 1.1fr;gap:30px;align-items:start}.event-panel{background:#fff;border:1px solid var(--hnue-line);border-radius:var(--hnue-radius);padding:24px}.calendar-embed iframe{width:100%;min-height:520px;border:0;border-radius:14px;background:#fff}.alumni-band{background:linear-gradient(135deg,#0a2944,#0064b4);color:#fff;border-radius:28px;padding:42px;display:grid;grid-template-columns:1.15fr .85fr;gap:30px}.alumni-band p{color:rgba(255,255,255,.88)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.stat{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);border-radius:16px;padding:18px}.stat b{display:block;font-size:1.7rem}.stat span{font-size:.84rem;color:rgba(255,255,255,.82)}
.content-wrap{width:min(calc(100% - 40px),940px);margin:auto;padding:58px 0}.entry-header{margin-bottom:28px}.entry-title{font-size:clamp(2rem,5vw,3.5rem);line-height:1.12;margin:0 0 12px}.entry-meta{color:var(--hnue-muted);font-size:.9rem}.entry-content{font-size:1.02rem}.entry-content h2,.entry-content h3{line-height:1.25;margin-top:1.6em}.entry-content table{width:100%;border-collapse:collapse;display:block;overflow:auto}.entry-content th,.entry-content td{border:1px solid var(--hnue-line);padding:10px 12px}.entry-content blockquote{margin:30px 0;padding:18px 24px;border-left:4px solid var(--hnue-blue);background:var(--hnue-bg)}
.archive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.pagination{margin-top:30px}.pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap}.pagination a,.pagination span{padding:8px 12px;border:1px solid var(--hnue-line);border-radius:9px}.site-footer{background:#0c2238;color:#d7e4ee;padding:56px 0 20px}.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px}.site-footer a{color:#fff}.site-footer h3{color:#fff}.copyright{border-top:1px solid rgba(255,255,255,.12);margin-top:36px;padding-top:18px;font-size:.86rem;color:#a9bdcc}
/* Legacy/plugin compatibility */
.pdb-list,.pdb-single,.abcfslStaffList,.abcfslGridCntr,.redirection-table{max-width:100%}.pdb-list table,.pdb-list-list{width:100%}.pdb-list table{border-collapse:collapse;background:#fff}.pdb-list th,.pdb-list td{padding:10px;border:1px solid var(--hnue-line)}.pdb-searchform input,.pdb-searchform select,.pdb-searchform button{padding:10px 12px;border:1px solid var(--hnue-line);border-radius:9px}.abcfslStaffList img{border-radius:14px}.wp-block-button__link{border-radius:10px}.alignwide{width:min(1200px,calc(100vw - 40px));max-width:none;margin-left:50%;transform:translateX(-50%)}
@media(max-width:900px){.primary-nav{display:none;position:absolute;left:0;right:0;top:100%;background:#fff;border-top:1px solid var(--hnue-line);padding:18px}.primary-nav.is-open{display:block}.primary-nav ul{display:block}.primary-nav li{padding:9px 0}.primary-nav .sub-menu{display:block;position:static;box-shadow:none;border:0;padding:4px 0 0 16px}.menu-toggle{display:block}.quick-grid,.pillar-grid,.news-grid,.archive-grid{grid-template-columns:1fr 1fr}.news-grid .featured{grid-column:1/-1}.events-layout,.alumni-band,.footer-grid{grid-template-columns:1fr}.hero{min-height:460px}.stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:620px){.container,.content-wrap{width:min(calc(100% - 28px),var(--hnue-max))}.utility .container{flex-direction:column;align-items:flex-start;padding:6px 0}.brand-title span{display:none}.site-logo img{max-height:48px}.hero-inner{padding:62px 0 58px}.quick-grid,.pillar-grid,.news-grid,.archive-grid{grid-template-columns:1fr}.quick-grid{margin-top:-26px}.section{padding:52px 0}.section-head{align-items:flex-start;flex-direction:column}.alumni-band{padding:28px}.stats{grid-template-columns:1fr}.calendar-embed iframe{min-height:430px}}

/* === HNUE Physics: Work Calendar page === */
/* STEP168G1559_CALENDAR_LAYOUT */
:is(.page-id-11,.page-id-14) .content-wrap{
  width:min(calc(100% - 40px),1200px);
}

:is(.page-id-11,.page-id-14)
.entry-content iframe[src*="calendar.google.com"]{
  display:block;
  width:100% !important;
  max-width:100%;
  height:750px;
  min-height:750px;
  border:1px solid var(--hnue-line) !important;
  border-radius:18px;
  background:#fff;
  box-shadow:var(--hnue-shadow);
}

@media(max-width:620px){
  :is(.page-id-11,.page-id-14) .content-wrap{
    width:min(calc(100% - 28px),1200px);
  }

  :is(.page-id-11,.page-id-14)
  .entry-content iframe[src*="calendar.google.com"]{
    height:600px;
    min-height:600px;
    border-radius:14px;
  }
}

/* === HNUE Physics: Modern Header === */

.utility{
  background:#0c2238;
  color:#fff;
}

.utility-inner{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.utility-brand{
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.045em;
}

.utility-links ul{
  list-style:none;
  display:flex;
  gap:18px;
  padding:0;
  margin:0;
}

.utility-links a{
  color:#fff;
  font-size:.78rem;
  opacity:.92;
}

.site-header{
  position:sticky;
  top:0;
  z-index:999;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--hnue-line);
}

.brand-row{
  min-height:92px;
  display:flex;
  align-items:center;
  gap:18px;
}

.site-logo{
  display:flex;
  align-items:center;
  flex:0 0 auto;
}

.site-logo .custom-logo-link{
  display:flex;
  align-items:center;
}

.site-logo img{
  width:auto;
  max-height:62px;
  display:block;
}

.brand-title{
  display:flex;
  flex-direction:column;
  justify-content:center;
  color:var(--hnue-ink);
  min-width:190px;
}

.brand-title:hover{
  text-decoration:none;
}

.brand-title strong{
  font-size:1.25rem;
  line-height:1.1;
  letter-spacing:.015em;
}

.brand-title span{
  margin-top:5px;
  font-size:.8rem;
  line-height:1.25;
  color:var(--hnue-muted);
}

.brand-mark{
  width:54px;
  height:54px;
  border-radius:14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  background:linear-gradient(145deg,var(--hnue-blue),var(--hnue-sky));
  color:#fff;
  font-weight:800;
  line-height:1;
}

.brand-mark-phys{
  font-size:.78rem;
}

.brand-mark-hnue{
  margin-top:3px;
  font-size:.67rem;
  letter-spacing:.08em;
}

.nav-wrap{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:18px;
}

.primary-nav > ul{
  display:flex;
  align-items:center;
  gap:4px;
}

.primary-nav > ul > li > a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 11px;
  border-radius:9px;
  font-size:.91rem;
  line-height:1.25;
  font-weight:700;
  color:var(--hnue-ink);
}

.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current-menu-ancestor > a{
  background:var(--hnue-bg);
  color:var(--hnue-blue);
  text-decoration:none;
}

.primary-nav .sub-menu{
  top:calc(100% + 2px);
}

.primary-nav .sub-menu a{
  display:block;
  padding:8px 10px;
  border-radius:8px;
}

.primary-nav .sub-menu a:hover{
  background:var(--hnue-bg);
  text-decoration:none;
}

.header-language{
  display:flex;
  align-items:center;
}

.lang-switcher{
  display:flex;
  align-items:center;
  gap:3px;
}

.lang-switcher a{
  padding:6px 8px;
  border:0;
  border-radius:7px;
  font-size:.8rem;
  font-weight:750;
}

.lang-switcher a:hover{
  background:var(--hnue-bg);
  text-decoration:none;
}

@media(max-width:1100px){
  .brand-title{
    min-width:155px;
  }

  .primary-nav > ul > li > a{
    padding-left:8px;
    padding-right:8px;
    font-size:.86rem;
  }
}

@media(max-width:900px){
  .brand-row{
    min-height:76px;
  }

  .brand-title{
    min-width:0;
  }

  .nav-wrap{
    margin-left:auto;
  }

  .header-language{
    order:1;
  }

  .menu-toggle{
    order:2;
  }

  .primary-nav{
    top:100%;
  }
}

@media(max-width:620px){
  .utility-inner{
    min-height:30px;
  }

  .utility-brand{
    font-size:.68rem;
  }

  .utility-links{
    display:none;
  }

  .brand-row{
    gap:12px;
  }

  .site-logo img{
    max-height:48px;
  }

  .brand-title strong{
    font-size:1.02rem;
  }

  .brand-title span{
    display:none;
  }
}

/* === HNUE Physics: Hero refinement === */

.hero{
  min-height:500px;
  background-position:center 43%;
}

.hero:before{
  background:
    linear-gradient(
      90deg,
      rgba(7,28,51,.88) 0%,
      rgba(7,28,51,.72) 32%,
      rgba(7,28,51,.38) 62%,
      rgba(7,28,51,.10) 100%
    );
}

.hero-inner{
  max-width:760px;
  padding:72px 0 76px;
}

.hero h1{
  font-size:clamp(2.7rem,5vw,4.45rem);
  line-height:1.04;
  max-width:760px;
  letter-spacing:-.025em;
}

.hero p{
  max-width:660px;
  font-size:1.12rem;
}

@media(max-width:900px){
  .hero{
    min-height:460px;
    background-position:center;
  }

  .hero h1{
    font-size:clamp(2.4rem,7vw,3.8rem);
  }
}

@media(max-width:620px){
  .hero{
    min-height:430px;
  }

  .hero-inner{
    padding:58px 0 64px;
  }

  .hero h1{
    font-size:clamp(2.2rem,10vw,3.1rem);
  }

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

/* === HNUE Physics: News placeholder === */

.post-thumb-placeholder{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-end;
  gap:8px;
  padding:24px;
  overflow:hidden;
  background:
    radial-gradient(circle at 82% 20%,rgba(0,160,240,.26),transparent 34%),
    linear-gradient(135deg,#0c2f4f 0%,#0064b4 62%,#00a0f0 100%);
  color:#fff;
}

.post-thumb-placeholder:before{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  right:-48px;
  top:-55px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
}

.post-thumb-placeholder:after{
  content:"";
  position:absolute;
  width:110px;
  height:110px;
  right:20px;
  top:18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
}

.post-placeholder-mark{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  height:34px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:9px;
  font-size:.76rem;
  font-weight:850;
  letter-spacing:.12em;
}

.post-placeholder-text{
  position:relative;
  z-index:1;
  max-width:220px;
  color:rgba(255,255,255,.92);
  font-size:.86rem;
  font-weight:650;
  line-height:1.35;
}

.post-thumb-placeholder:hover{
  text-decoration:none;
}

@media(max-width:620px){
  .post-thumb-placeholder{
    padding:20px;
  }
}

/* === HNUE Physics: Homepage calendar full-width refinement === */

.calendar-home-full{
  margin-top:24px;
}

.calendar-home-full .calendar-embed{
  width:100%;
}

.calendar-home-full .calendar-embed iframe{
  width:100%;
  min-height:520px;
  border:1px solid var(--hnue-line);
  border-radius:18px;
  box-shadow:var(--hnue-shadow);
  background:#fff;
}

.calendar-full-link{
  background:var(--hnue-blue);
  color:#fff;
  border-color:var(--hnue-blue);
  white-space:nowrap;
}

.calendar-full-link:hover{
  background:#004f8f;
  color:#fff;
  text-decoration:none;
}

@media(max-width:900px){
  .calendar-full-link{
    margin-top:14px;
  }
}

@media(max-width:620px){
  .calendar-home-full .calendar-embed iframe{
    min-height:440px;
    border-radius:14px;
  }

  .calendar-full-link{
    width:100%;
  }
}

/* === HNUE Physics: People archive === */

.people-archive{
  width:min(calc(100% - 40px),1180px);
}

.people-archive-header{
  margin-bottom:34px;
}

.people-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:22px;
}

.people-card{
  background:#fff;
  border:1px solid var(--hnue-line);
  border-radius:18px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .22s ease, box-shadow .22s ease;
}

.people-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--hnue-shadow);
}

.people-photo{
  display:block;
  aspect-ratio:4/5;
  background:#edf3f8;
  overflow:hidden;
}

.people-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.people-photo-placeholder{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 78% 18%,rgba(0,160,240,.18),transparent 32%),
    linear-gradient(135deg,#eaf2f8,#d8e7f2);
  color:#5b7488;
  font-size:1rem;
  font-weight:800;
  letter-spacing:.12em;
}

.people-card-body{
  padding:18px 18px 20px;
}

.people-degree{
  font-size:.8rem;
  font-weight:750;
  color:var(--hnue-blue);
  text-transform:uppercase;
  letter-spacing:.035em;
  margin-bottom:5px;
}

.people-name{
  font-size:1.12rem;
  line-height:1.3;
  margin:0 0 8px;
}

.people-name a{
  color:inherit;
}

.people-role{
  font-size:.9rem;
  font-weight:650;
  margin-bottom:5px;
}

.people-groups{
  font-size:.84rem;
  line-height:1.45;
  color:var(--hnue-muted);
}

@media(max-width:1000px){
  .people-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .people-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:480px){
  .people-grid{
    grid-template-columns:1fr;
  }
}


/* === HNUE Physics: People archive section refinement === */

.people-section{
  margin-top:58px;
}

.people-section-heading{
  margin-bottom:30px;
}

.people-section-heading h2{
  margin:0 0 8px;
  font-size:clamp(1.7rem,2.7vw,2.25rem);
  line-height:1.2;
}

.people-section-heading p{
  margin:0;
  max-width:760px;
  color:var(--hnue-muted);
  line-height:1.6;
}

.people-leadership{
  margin-top:42px;
}

.people-leadership-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  max-width:850px;
}

.people-group-section{
  margin-top:42px;
}

.people-group-section:first-of-type{
  margin-top:0;
}

.people-group-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
  padding-bottom:10px;
  border-bottom:1px solid var(--hnue-line);
}

.people-group-heading h3{
  margin:0;
  font-size:1.25rem;
  line-height:1.3;
}

.people-group-heading h3 a{
  color:var(--hnue-blue);
}

.people-group-heading span{
  flex:0 0 auto;
  font-size:.86rem;
  color:var(--hnue-muted);
}

.people-history{
  padding-top:8px;
  border-top:1px solid var(--hnue-line);
}

@media(max-width:900px){
  .people-leadership-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .people-leadership-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .people-group-heading{
    align-items:flex-start;
  }
}

@media(max-width:480px){
  .people-leadership-grid{
    grid-template-columns:1fr;
  }

  .people-group-heading{
    display:block;
  }

  .people-group-heading span{
    display:block;
    margin-top:5px;
  }
}

/* === HNUE Physics: People jump navigation === */

.people-jump-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 34px;
  padding:12px;
  border:1px solid var(--hnue-line);
  border-radius:16px;
  background:#fff;
}

.people-jump-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:9px 14px;
  border-radius:10px;
  background:var(--hnue-bg);
  color:var(--hnue-blue);
  font-size:.9rem;
  font-weight:700;
  line-height:1.2;
}

.people-jump-nav a:hover{
  background:var(--hnue-blue);
  color:#fff;
  text-decoration:none;
}

#ban-chu-nhiem,
#doi-ngu-hien-tai,
#cac-the-he{
  scroll-margin-top:130px;
}

@media(max-width:620px){
  .people-jump-nav{
    display:grid;
    grid-template-columns:1fr;
  }

  .people-jump-nav a{
    width:100%;
  }
}

/* === HNUE Physics: Back to top === */

.people-back-to-top{
  position:fixed;
  right:24px;
  bottom:24px;
  width:46px;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--hnue-blue);
  color:#fff;
  font-size:1.35rem;
  font-weight:800;
  line-height:1;
  text-decoration:none;
  box-shadow:0 8px 24px rgba(0,0,0,.16);
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:
    opacity .2s ease,
    visibility .2s ease,
    transform .2s ease,
    background .2s ease;
  z-index:999;
}

.people-back-to-top.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.people-back-to-top:hover{
  background:#004f8f;
  color:#fff;
  text-decoration:none;
}

@media(max-width:620px){
  .people-back-to-top{
    right:16px;
    bottom:16px;
    width:42px;
    height:42px;
  }
}

/* === HNUE Physics: Person profile === */

.person-profile{
  width:min(calc(100% - 40px),1080px);
}

.person-profile-head{
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:34px;
  align-items:start;
  margin-bottom:34px;
}

.person-profile-photo{
  border-radius:20px;
  overflow:hidden;
  background:#eef3f7;
  border:1px solid var(--hnue-line);
}

.person-profile-photo img{
  display:block;
  width:100%;
  height:auto;
}

.person-profile-summary{
  padding-top:8px;
}

.person-status{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 10px;
  margin-bottom:14px;
  border-radius:999px;
  background:var(--hnue-bg);
  color:var(--hnue-blue);
  font-size:.82rem;
  font-weight:750;
}

.person-profile-summary .entry-title{
  margin-bottom:16px;
}

.person-profile-groups{
  margin:0;
  font-size:1rem;
  line-height:1.6;
  color:var(--hnue-muted);
}

.person-profile-groups a{
  color:var(--hnue-blue);
  font-weight:650;
}

.person-facts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  margin:0 0 42px;
  border:1px solid var(--hnue-line);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}

.person-facts > div{
  display:grid;
  grid-template-columns:170px minmax(0,1fr);
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--hnue-line);
}

.person-facts > div:nth-child(odd){
  border-right:1px solid var(--hnue-line);
}

.person-facts > div:nth-last-child(-n+2){
  border-bottom:0;
}

.person-facts dt{
  margin:0;
  font-size:.86rem;
  font-weight:750;
  color:var(--hnue-muted);
}

.person-facts dd{
  margin:0;
  font-size:.95rem;
  font-weight:600;
}

.person-section{
  margin-top:42px;
}

.person-section h2{
  margin:0 0 18px;
  font-size:1.55rem;
  line-height:1.25;
}

.person-section-text{
  font-size:1rem;
  line-height:1.7;
}

.person-leadership-list{
  margin:0;
  padding-left:20px;
}

.person-leadership-list li{
  margin:8px 0;
  line-height:1.55;
}

.person-leadership-list li span{
  margin-left:8px;
  color:var(--hnue-muted);
}

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

.person-links a,
.person-links span{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:9px 13px;
  border:1px solid var(--hnue-line);
  border-radius:10px;
  background:#fff;
  font-size:.9rem;
  font-weight:650;
}

.person-source{
  margin-top:36px;
  padding-top:20px;
  border-top:1px solid var(--hnue-line);
  color:var(--hnue-muted);
  font-size:.88rem;
}

.person-backlinks{
  margin-top:40px;
  padding-top:20px;
  border-top:1px solid var(--hnue-line);
}

.person-backlinks a{
  font-weight:700;
  color:var(--hnue-blue);
}

@media(max-width:820px){
  .person-profile-head{
    grid-template-columns:220px minmax(0,1fr);
  }

  .person-facts{
    grid-template-columns:1fr;
  }

  .person-facts > div{
    border-right:0 !important;
  }

  .person-facts > div:nth-last-child(-n+2){
    border-bottom:1px solid var(--hnue-line);
  }

  .person-facts > div:last-child{
    border-bottom:0;
  }
}

@media(max-width:620px){
  .person-profile-head{
    grid-template-columns:1fr;
  }

  .person-profile-photo{
    max-width:320px;
  }

  .person-facts > div{
    grid-template-columns:1fr;
    gap:5px;
  }
}

/* === HNUE Physics: Person profile header spacing === */

.person-profile{
  padding-top:34px;
}

.person-profile-summary{
  padding-top:14px;
}

.person-status{
  margin-bottom:16px;
}


/* === HNUE Physics: Current roles in person profile === */

.person-current-roles{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 14px;
}

.person-current-roles span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(0,100,180,.08);
  border:1px solid rgba(0,100,180,.16);
  color:var(--hnue-blue);
  font-size:.84rem;
  font-weight:750;
  line-height:1.2;
}


/* === HNUE Physics: Academic group profile === */

.group-profile{
  width:min(calc(100% - 40px),1180px);
  padding-top:34px;
}

.group-profile-header{
  margin-bottom:32px;
}

.group-profile-kicker{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  margin-bottom:14px;
  border-radius:999px;
  background:var(--hnue-bg);
  color:var(--hnue-blue);
  font-size:.8rem;
  font-weight:750;
}

.group-profile-name-en{
  margin-top:10px;
  color:var(--hnue-muted);
  font-size:1.05rem;
  font-weight:600;
}

.group-profile-summary{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(300px,.7fr);
  gap:30px;
  align-items:start;
  margin-bottom:48px;
}

.group-profile-focus{
  padding:26px 28px;
  border:1px solid var(--hnue-line);
  border-radius:18px;
  background:#fff;
}

.group-profile-focus h2{
  margin:0 0 14px;
  font-size:1.45rem;
  line-height:1.25;
}

.group-profile-focus-text{
  font-size:1rem;
  line-height:1.75;
}

.group-profile-meta{
  display:grid;
  gap:12px;
}

.group-profile-meta-card{
  padding:18px 20px;
  border:1px solid var(--hnue-line);
  border-radius:16px;
  background:#fff;
}

.group-profile-meta-label{
  margin-bottom:6px;
  color:var(--hnue-muted);
  font-size:.82rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.035em;
}

.group-profile-meta-value{
  font-size:1rem;
  font-weight:700;
  line-height:1.45;
}

.group-profile-meta-value a{
  color:var(--hnue-blue);
}

.group-profile-section{
  margin-top:48px;
}

.group-profile-section > h2{
  margin:0 0 20px;
  font-size:1.65rem;
  line-height:1.25;
}

.group-profile-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:20px;
  padding-bottom:10px;
  border-bottom:1px solid var(--hnue-line);
}

.group-profile-section-head h2{
  margin:0;
  font-size:1.65rem;
  line-height:1.25;
}

.group-profile-section-head span{
  flex:0 0 auto;
  color:var(--hnue-muted);
  font-size:.9rem;
}

.group-profile-external{
  margin-top:34px;
}

.group-profile-external a{
  font-weight:700;
  color:var(--hnue-blue);
}

@media(max-width:820px){
  .group-profile-summary{
    grid-template-columns:1fr;
  }
}

@media(max-width:620px){
  .group-profile-section-head{
    display:block;
  }

  .group-profile-section-head span{
    display:block;
    margin-top:6px;
  }
}


/* === HNUE Physics: Academic groups archive === */

.groups-archive{
  width:min(calc(100% - 40px),1180px);
  padding-top:34px;
}

.groups-archive-header{
  margin-bottom:38px;
}

.groups-section{
  margin-top:46px;
}

.groups-section-heading{
  margin-bottom:20px;
}

.groups-section-heading h2{
  margin:0;
  font-size:1.65rem;
  line-height:1.25;
}

.groups-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

.groups-grid-support{
  grid-template-columns:minmax(0,1fr);
  max-width:760px;
}

.group-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--hnue-line);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(0,0,0,.02);
}

.group-card-body{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:24px;
}

.group-card h2{
  margin:0 0 8px;
  font-size:1.3rem;
  line-height:1.3;
}

.group-card h2 a{
  color:var(--hnue-blue);
}

.group-card-name-en{
  margin-bottom:16px;
  color:var(--hnue-muted);
  font-size:.9rem;
  font-weight:600;
}

.group-card-focus{
  margin-bottom:22px;
  color:#33495b;
  font-size:.94rem;
  line-height:1.65;
}

.group-card-meta{
  display:grid;
  gap:10px;
  margin-top:auto;
  padding-top:16px;
  border-top:1px solid var(--hnue-line);
}

.group-card-meta > div{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}

.group-card-meta span{
  color:var(--hnue-muted);
  font-size:.82rem;
}

.group-card-meta strong{
  text-align:right;
  font-size:.9rem;
}

.group-card-link{
  display:inline-flex;
  align-items:center;
  margin-top:18px;
  color:var(--hnue-blue);
  font-size:.9rem;
  font-weight:700;
}

.groups-support-section{
  padding-top:10px;
}

@media(max-width:900px){
  .groups-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .groups-grid-support{
    grid-template-columns:1fr;
  }
}

@media(max-width:620px){
  .groups-grid{
    grid-template-columns:1fr;
  }
}

/* === HNUE Physics: Third-level desktop submenu === */

@media(min-width:901px){

  .primary-nav .sub-menu .menu-item-has-children > .sub-menu{
    top:0;
    left:calc(100% + 6px);
    min-width:260px;
  }

  .primary-nav .sub-menu .menu-item-has-children > a{
    position:relative;
    padding-right:28px;
  }

  .primary-nav .sub-menu .menu-item-has-children > a:after{
    content:"›";
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    font-size:1.1rem;
    line-height:1;
    color:var(--hnue-muted);
  }

}

/* === HNUE Physics: Organization page === */

.org-page{
  width:min(calc(100% - 40px),1180px);
  padding-top:34px;
}

.org-page-header{
  margin-bottom:34px;
}

.org-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

.org-card{
  display:block;
  min-height:190px;
  padding:26px;
  border:1px solid var(--hnue-line);
  border-radius:18px;
  background:#fff;
  color:var(--hnue-ink);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.org-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--hnue-shadow);
  border-color:rgba(0,100,180,.24);
  text-decoration:none;
}

.org-card h2{
  margin:0 0 12px;
  font-size:1.35rem;
  line-height:1.25;
  color:var(--hnue-blue);
}

.org-card p{
  margin:0;
  color:var(--hnue-muted);
  font-size:.95rem;
  line-height:1.65;
}

.org-card-featured{
  background:
    radial-gradient(circle at 86% 14%,rgba(0,160,240,.10),transparent 34%),
    #fff;
}

@media(max-width:900px){
  .org-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:620px){
  .org-grid{
    grid-template-columns:1fr;
  }

  .org-card{
    min-height:auto;
  }
}

/* === HNUE Physics: Organization card icons === */

.org-card-title{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.org-card-title h2{
  margin:0;
}

.org-card-icon{
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:rgba(0,100,180,.08);
  color:var(--hnue-blue);
}

.org-card-icon svg{
  width:24px;
  height:24px;
  display:block;
}

.org-card:hover .org-card-icon{
  background:rgba(0,100,180,.13);
}

@media(max-width:620px){
  .org-card-icon{
    width:40px;
    height:40px;
    flex-basis:40px;
  }

  .org-card-icon svg{
    width:22px;
    height:22px;
  }
}

/* === HNUE Physics: Organization card icons === */

.org-card-title{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.org-card-title h2{
  margin:0;
}

.org-card-icon{
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:rgba(0,100,180,.08);
  color:var(--hnue-blue);
}

.org-card-icon svg{
  width:24px;
  height:24px;
  display:block;
}

.org-card:hover .org-card-icon{
  background:rgba(0,100,180,.13);
}

@media(max-width:620px){
  .org-card-icon{
    width:40px;
    height:40px;
    flex-basis:40px;
  }

  .org-card-icon svg{
    width:22px;
    height:22px;
  }
}

/* === HNUE Physics: Vietnam flag icon === */

.org-card-icon--flag{
  background:rgba(218,37,29,.08);
  color:inherit;
}

.org-card-icon--flag svg{
  width:30px;
  height:30px;
}

.org-card:hover .org-card-icon--flag{
  background:rgba(218,37,29,.12);
}


/* === HNUE Physics: Center second row of organization cards === */
@media(min-width:901px){
  .org-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
  }

  .org-grid > .org-card{
    grid-column:span 2;
  }

  .org-grid > .org-card:nth-child(4){
    grid-column:2 / span 2;
  }

  .org-grid > .org-card:nth-child(5){
    grid-column:4 / span 2;
  }
}


/* === HNUE Physics: Party Committee layout === */
@media(min-width:901px){

  .party-page .people-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
  }

  .party-page .people-grid > .people-card{
    grid-column:span 2;
  }

  /* Secretary */
  .party-page .people-grid > .people-card:nth-child(1){
    grid-column:2 / span 2;
  }

  /* Deputy Secretary */
  .party-page .people-grid > .people-card:nth-child(2){
    grid-column:4 / span 2;
  }

  /* Committee members: second row, three equal cards */
  .party-page .people-grid > .people-card:nth-child(3){
    grid-column:1 / span 2;
  }

  .party-page .people-grid > .people-card:nth-child(4){
    grid-column:3 / span 2;
  }

  .party-page .people-grid > .people-card:nth-child(5){
    grid-column:5 / span 2;
  }
}


/* === HNUE Physics: Refine Party Committee card width === */
@media(min-width:901px){
  .party-page .people-grid{
    width:100%;
    max-width:980px;
    margin-left:auto;
    margin-right:auto;
    gap:22px;
  }
}


/* === HNUE Physics: Faculty Leadership layout === */
@media(min-width:901px){

  .leadership-page .leadership-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    max-width:980px;
    margin-left:auto;
    margin-right:auto;
    gap:22px;
  }

  .leadership-page .leadership-grid > .people-card{
    grid-column:span 2;
  }

  /* Dean: centered first row */
  .leadership-page .leadership-grid > .people-card:nth-child(1){
    grid-column:3 / span 2;
  }

  /* Vice Deans: centered second row */
  .leadership-page .leadership-grid > .people-card:nth-child(2){
    grid-column:2 / span 2;
  }

  .leadership-page .leadership-grid > .people-card:nth-child(3){
    grid-column:4 / span 2;
  }
}


/* === HNUE Physics: Faculty Union layout === */
@media(min-width:901px){

  .union-page .union-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    max-width:980px;
    margin-left:auto;
    margin-right:auto;
    gap:22px;
  }

  .union-page .union-grid > .people-card{
    grid-column:3 / span 2;
  }
}


/* === HNUE Physics: Youth Union & Student Association sections === */

.youth-student-section{
  margin-top:38px;
}

.youth-student-section + .youth-student-section{
  margin-top:56px;
  padding-top:42px;
  border-top:1px solid var(--hnue-line);
}

.youth-student-section .people-section-heading{
  margin-bottom:24px;
}

.youth-student-section .people-section-heading h2{
  margin-bottom:0;
}

/* Current layout: one leader per organization */
@media(min-width:901px){

  .youth-block-grid,
  .student-block-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    max-width:980px;
    margin-left:auto;
    margin-right:auto;
    gap:22px;
  }

  .youth-block-grid > .people-card:first-child,
  .student-block-grid > .people-card:first-child{
    grid-column:3 / span 2;
  }

  /*
   * Future-ready:
   * if deputy positions are added, place them on the next row.
   */
  .youth-block-grid > .people-card:nth-child(n+2),
  .student-block-grid > .people-card:nth-child(n+2){
    grid-column:span 2;
  }
}


/* === HNUE Physics: Leadership hierarchy for Youth Union / Student Association === */
@media(min-width:901px){

  .youth-block-grid > .people-card:first-child,
  .student-block-grid > .people-card:first-child{
    grid-column:3 / span 2;
    grid-row:1;
  }

  .youth-block-grid > .people-card:nth-child(2),
  .student-block-grid > .people-card:nth-child(2){
    grid-column:2 / span 2;
    grid-row:2;
  }

  .youth-block-grid > .people-card:nth-child(3),
  .student-block-grid > .people-card:nth-child(3){
    grid-column:4 / span 2;
    grid-row:2;
  }

  .youth-block-grid > .people-card:nth-child(n+4),
  .student-block-grid > .people-card:nth-child(n+4){
    grid-column:span 2;
  }
}


/* History single */
.history-single-wrap {
    max-width: 1040px;
}

.history-single {
    max-width: 940px;
    margin: 0 auto;
}

.history-single-header {
    margin-bottom: 34px;
}

.history-single-period {
    display: inline-block;
    margin-bottom: 12px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #eaf5ff;
    color: #0064b4;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.history-single-title {
    margin: 0;
    max-width: 900px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.history-single-lead {
    margin-top: 18px;
    max-width: 820px;
    font-size: 1.08rem;
    line-height: 1.75;
    color: #536273;
}

.history-single-content {
    max-width: 860px;
    margin: 0 auto;
    font-size: 1.04rem;
    line-height: 1.78;
}

.history-single-content p {
    margin: 0 0 1.35em;
}

.history-single-content figure {
    margin: 34px auto;
}

.history-single-content figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

.history-single-content .has-text-align-center {
    text-align: center;
}

.history-single-content figure + .has-text-align-center,
.history-single-content .has-text-align-center em {
    color: #5e6975;
    font-size: 0.94rem;
    line-height: 1.55;
}

.history-single-footer {
    max-width: 860px;
    margin: 42px auto 0;
    padding-top: 22px;
    border-top: 1px solid #e4e9ef;
}

.history-single-footer a {
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 767px) {
    .history-single-title {
        font-size: 2rem;
    }

    .history-single-content {
        font-size: 1rem;
    }
}

/* History landing */
.history-landing-wrap {
    max-width: 1180px;
}

.history-landing-header {
    max-width: 900px;
    margin: 0 auto 56px;
}

.history-landing-kicker {
    margin-bottom: 10px;
    color: #0064b4;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-landing-title {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.history-landing-lead {
    max-width: 820px;
    margin-top: 20px;
    color: #536273;
    font-size: 1.08rem;
    line-height: 1.75;
}

.history-timeline {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding-left: 54px;
}

.history-timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #dce8f2;
}

.history-timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.history-timeline-marker {
    position: absolute;
    left: -46px;
    top: 28px;
    width: 18px;
    height: 18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #008fe5;
    box-shadow: 0 0 0 2px #b7dcf5;
}

.history-timeline-card {
    overflow: hidden;
    border: 1px solid #e3eaf0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(20, 45, 70, 0.06);
}

.history-timeline-image {
    display: block;
    background: #f4f7fa;
}

.history-timeline-image img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.history-timeline-body {
    padding: 28px 30px 30px;
}

.history-timeline-period {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eaf5ff;
    color: #0064b4;
    font-size: 0.9rem;
    font-weight: 700;
}

.history-timeline-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.18;
}

.history-timeline-title a {
    color: inherit;
    text-decoration: none;
}

.history-timeline-title a:hover {
    color: #0064b4;
}

.history-timeline-excerpt {
    margin-top: 14px;
    color: #536273;
    font-size: 1rem;
    line-height: 1.7;
}

.history-timeline-link {
    display: inline-block;
    margin-top: 18px;
    color: #0064b4;
    font-weight: 700;
    text-decoration: none;
}

.history-timeline-link:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .history-landing-header {
        margin-bottom: 40px;
    }

    .history-timeline {
        padding-left: 34px;
    }

    .history-timeline::before {
        left: 8px;
    }

    .history-timeline-marker {
        left: -34px;
        top: 22px;
        width: 16px;
        height: 16px;
    }

    .history-timeline-image img {
        height: 210px;
    }

    .history-timeline-body {
        padding: 22px 20px 24px;
    }
}

/* Preserve complete historical images in timeline cards */
.history-timeline-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    background: #f4f7fa;
}

.history-timeline-image img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 767px) {
    .history-timeline-image {
        min-height: 220px;
    }

    .history-timeline-image img {
        height: 260px;
    }
}

/* History timeline image ratios */
.history-timeline-item.history-image-landscape .history-timeline-image {
    min-height: 0;
    padding: 0;
}

.history-timeline-item.history-image-landscape .history-timeline-image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
}

.history-timeline-item.history-image-square .history-timeline-image {
    min-height: 0;
    padding: 24px;
}

.history-timeline-item.history-image-square .history-timeline-image img {
    width: auto;
    max-width: 100%;
    height: 360px;
    object-fit: contain;
}

.history-timeline-item.history-image-portrait .history-timeline-image {
    min-height: 0;
    padding: 28px 24px;
}

.history-timeline-item.history-image-portrait .history-timeline-image img {
    width: auto;
    max-width: 100%;
    height: 460px;
    object-fit: contain;
}

.history-timeline-item.history-image-none .history-timeline-card {
    border-left: 4px solid #d9ecfa;
}

.history-timeline-item.history-image-none .history-timeline-body {
    padding-top: 30px;
}

@media (max-width: 767px) {
    .history-timeline-item.history-image-square .history-timeline-image {
        padding: 16px;
    }

    .history-timeline-item.history-image-square .history-timeline-image img {
        height: 260px;
    }

    .history-timeline-item.history-image-portrait .history-timeline-image {
        padding: 18px 14px;
    }

    .history-timeline-item.history-image-portrait .history-timeline-image img {
        height: 360px;
    }

    .history-timeline-item.history-image-landscape .history-timeline-image img {
        max-height: 300px;
    }
}

/* Mission - Vision - Philosophy - Core Values */
.faculty-values-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.faculty-value-card {
    position: relative;
    min-height: 230px;
    padding: 30px 30px 28px;
    border: 1px solid #e2eaf1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(20, 45, 70, 0.055);
}

.faculty-value-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    width: 62px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: #008fe5;
}

.faculty-value-card h2 {
    margin: 4px 0 18px;
    color: #102844;
    font-size: 1.55rem;
    line-height: 1.2;
}

.faculty-value-card p {
    margin: 0;
    color: #34495f;
    font-size: 1.02rem;
    line-height: 1.75;
}

.faculty-value-core {
    background: #f7fbff;
}

.faculty-value-core p {
    color: #0064b4;
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .faculty-values-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .faculty-value-card {
        min-height: 0;
        padding: 24px 22px;
    }

    .faculty-value-card h2 {
        font-size: 1.35rem;
    }
}

/* Featured achievements */
.faculty-achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.faculty-achievement-card {
    position: relative;
    padding: 30px 30px 28px;
    border: 1px solid #e2eaf1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(20, 45, 70, 0.055);
}

.faculty-achievement-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    width: 62px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: #008fe5;
}

.faculty-achievement-main {
    grid-column: 1 / -1;
    background: #f8fbfe;
}

.faculty-achievement-card h2 {
    margin: 4px 0 18px;
    color: #102844;
    font-size: 1.5rem;
    line-height: 1.25;
}

.faculty-achievement-card p,
.faculty-achievement-card li {
    color: #34495f;
    font-size: 1rem;
    line-height: 1.75;
}

.faculty-achievement-card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.faculty-achievement-card li + li {
    margin-top: 8px;
}

@media (max-width: 767px) {
    .faculty-achievements-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .faculty-achievement-main {
        grid-column: auto;
    }

    .faculty-achievement-card {
        padding: 24px 22px;
    }

    .faculty-achievement-card h2 {
        font-size: 1.32rem;
    }
}

/* News & Activities landing */
.news-landing {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.news-landing-header {
  margin-bottom: 2.25rem;
}

.news-landing-header .entry-title {
  margin-bottom: 0.65rem;
}

.news-landing-header .entry-meta {
  max-width: 820px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.news-section {
  margin-top: 2.75rem;
}

.news-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(0, 100, 180, 0.16);
}

.news-section-heading h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

.news-section-heading a {
  flex: 0 0 auto;
  font-weight: 600;
  text-decoration: none;
}

.news-section-empty {
  margin: 0;
  padding: 1rem 1.1rem;
  background: rgba(0, 100, 180, 0.04);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .news-section-heading {
    align-items: flex-start;
  }

  .news-section-heading h2 {
    font-size: 1.3rem;
  }

  .news-section-heading a {
    font-size: 0.92rem;
  }
}

/* === HNUE Physics: 3-level dynamic header === */

.site-header{
  position:sticky;
  top:0;
  z-index:999;
  background:#fff;
  border-bottom:1px solid var(--hnue-line);
}

.utility{
  background:#0c2238;
  color:#fff;
}

.utility-inner{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.utility-right{
  display:flex;
  align-items:center;
  gap:18px;
  margin-left:auto;
}

.utility-date{
  font-size:.76rem;
  opacity:.88;
  white-space:nowrap;
}

.faculty-banner{
  background:#fff;
  border-bottom:1px solid var(--hnue-line);
}

.faculty-branding{
  min-height:126px;
  display:flex;
  align-items:center;
  gap:22px;
  padding-top:14px;
  padding-bottom:14px;
}

.faculty-logo{
  display:flex;
  align-items:center;
  flex:0 0 auto;
}

.faculty-logo img,
.faculty-logo-image{
  display:block;
  width:auto;
  max-height:94px;
}

.faculty-brand-title{
  display:flex;
  flex-direction:column;
  justify-content:center;
  color:var(--hnue-ink);
  text-decoration:none;
}

.faculty-brand-title:hover{
  text-decoration:none;
}

.faculty-brand-title strong{
  font-size:2rem;
  line-height:1.08;
  letter-spacing:.015em;
}

.faculty-brand-title span{
  margin-top:8px;
  font-size:.95rem;
  line-height:1.35;
  color:var(--hnue-muted);
}

.faculty-banner-link{
  display:block;
}

.faculty-banner-picture{
  display:block;
  width:100%;
}

.faculty-banner-picture img{
  display:block;
  width:100%;
  height:auto;
  max-height:180px;
  object-fit:cover;
}

.primary-nav-bar{
  background:#fff;
  border-bottom:1px solid var(--hnue-line);
}

.nav-row{
  min-height:58px;
  display:flex;
  align-items:center;
  gap:14px;
}

.nav-row .primary-nav{
  flex:1 1 auto;
}

.primary-nav > ul{
  display:flex;
  align-items:center;
  gap:4px;
  margin:0;
  padding:0;
}

.primary-nav > ul > li > a{
  min-height:46px;
  display:flex;
  align-items:center;
  padding:10px 12px;
  border-radius:9px;
  font-size:.92rem;
  line-height:1.2;
  font-weight:700;
  white-space:nowrap;
}

.header-language{
  flex:0 0 auto;
  margin-left:auto;
}

@media(max-width:1100px){
  .faculty-branding{
    min-height:112px;
  }

  .faculty-logo img,
  .faculty-logo-image{
    max-height:80px;
  }

  .faculty-brand-title strong{
    font-size:1.7rem;
  }

  .faculty-brand-title span{
    font-size:.88rem;
  }

  .primary-nav > ul > li > a{
    padding-left:9px;
    padding-right:9px;
    font-size:.87rem;
  }
}

@media(max-width:900px){
  .faculty-branding{
    min-height:92px;
  }

  .nav-row{
    position:relative;
    min-height:54px;
  }

  .menu-toggle{
    display:block;
    order:1;
  }

  .header-language{
    order:2;
    margin-left:auto;
  }

  .primary-nav{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:#fff;
    border-top:1px solid var(--hnue-line);
    padding:16px;
    box-shadow:var(--hnue-shadow);
  }

  .primary-nav.is-open{
    display:block;
  }

  .primary-nav > ul{
    display:block;
  }

  .primary-nav > ul > li > a{
    min-height:0;
    padding:10px 8px;
    white-space:normal;
  }

  .primary-nav .sub-menu{
    display:block;
    position:static;
    box-shadow:none;
    border:0;
    padding:4px 0 0 16px;
  }
}

@media(max-width:620px){
  .utility-inner{
    min-height:30px;
  }

  .utility-right{
    gap:10px;
  }

  .utility-date{
    font-size:.68rem;
  }

  .utility-links{
    display:none;
  }

  .faculty-branding{
    min-height:82px;
    gap:14px;
  }

  .faculty-logo img,
  .faculty-logo-image{
    max-height:64px;
  }

  .faculty-brand-title strong{
    font-size:1.28rem;
  }

  .faculty-brand-title span{
    margin-top:5px;
    font-size:.76rem;
  }

  .faculty-banner-picture img{
    max-height:150px;
  }
}

/* Utility bar after removing school name */
.utility-inner{
  justify-content:flex-end;
}

.utility-right{
  margin-left:0;
}

/* Preserve full campaign/default banner artwork */
.faculty-banner-picture{
  display:block;
  width:100%;
  text-align:center;
  background:#fff;
}

.faculty-banner-picture img{
  display:block;
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
}

/* Logo overlay on banner */
.faculty-banner{
  position:relative;
}

.faculty-banner-logo-wrap{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-start;
  pointer-events:none;
}

.faculty-banner-logo{
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:18px;
  padding:8px;
  border-radius:14px;
  background:rgba(255,255,255,.90);
  box-shadow:0 8px 24px rgba(12,34,56,.12);
  backdrop-filter:blur(6px);
}

.faculty-banner-logo-image{
  display:block;
  width:auto;
  height:auto;
  max-width:92px;
  max-height:92px;
}

@media(max-width:620px){
  .faculty-banner-logo{
    margin-top:10px;
    padding:6px;
    border-radius:10px;
  }

  .faculty-banner-logo-image{
    max-width:64px;
    max-height:64px;
  }
}

/* Header scrolling behaviour: banner scrolls, menu stays sticky */
.site-header{
  position:static;
  top:auto;
}

.primary-nav-bar{
  position:sticky;
  top:0;
  z-index:998;
}

/* Responsive compact banner */
@media (min-width:901px){
  .faculty-banner{
    height:clamp(160px, 14vw, 220px);
    overflow:hidden;
  }

  .faculty-banner-link,
  .faculty-banner-picture{
    width:100%;
    height:100%;
  }

  .faculty-banner-picture img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
  }
}

/* Banner: preserve original 1920 × 724 aspect ratio */
@media (min-width:901px){
  .faculty-banner{
    height:auto;
    overflow:visible;
  }

  .faculty-banner-link,
  .faculty-banner-picture{
    display:block;
    width:100%;
    height:auto;
  }

  .faculty-banner-picture img{
    display:block;
    width:100%;
    height:auto;
    max-height:none;
    aspect-ratio:1920 / 724;
    object-fit:contain;
    object-position:center center;
  }
}

/* Logo: preserve uploaded image proportions automatically */
.faculty-banner-logo{
  width:auto;
  height:auto;
  padding:8px;
}

.faculty-banner-logo-image{
  display:block;
  width:auto;
  height:auto;
  max-width:min(18vw, 180px);
  max-height:120px;
  object-fit:contain;
}

.faculty-logo img,
.faculty-logo-image{
  width:auto;
  height:auto;
  max-width:min(18vw, 180px);
  max-height:120px;
  object-fit:contain;
}

@media(max-width:620px){
  .faculty-banner-logo-image,
  .faculty-logo img,
  .faculty-logo-image{
    max-width:110px;
    max-height:80px;
  }
}

/* Banner dimensions follow uploaded image naturally */
.faculty-banner{
  position:relative;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible;
  background:#fff;
}

.faculty-banner-link,
.faculty-banner-picture{
  display:block;
  width:100%;
  height:auto !important;
}

.faculty-banner-picture img{
  display:block;
  width:100%;
  height:auto !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  object-fit:contain !important;
  object-position:center center;
}

/* Overlay logo must not affect banner height */
.faculty-banner-logo-wrap{
  position:absolute;
  inset:0;
  height:auto;
}

/* Wider layout for modern desktop screens */
:root{
  --hnue-max:1480px;
}

/* Flexible footer */
.site-footer{
  background:#0c2238;
  color:#fff;
  padding:42px 0 22px;
}

.footer-simple-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:56px;
  align-items:start;
}

.footer-contact h3,
.footer-visits h3{
  margin:0 0 14px;
  color:#fff;
}

.footer-contact p{
  margin:7px 0;
  color:rgba(255,255,255,.88);
}

.footer-contact a{
  color:#fff;
}

.visit-stats{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.visit-stat{
  min-width:130px;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:12px;
  background:rgba(255,255,255,.06);
}

.visit-stat strong{
  display:block;
  font-size:1.5rem;
  line-height:1.1;
  color:#fff;
}

.visit-stat span{
  display:block;
  margin-top:6px;
  font-size:.84rem;
  color:rgba(255,255,255,.78);
}

.site-footer .copyright{
  margin-top:28px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.14);
  color:rgba(255,255,255,.72);
  font-size:.86rem;
}

@media(max-width:760px){
  .footer-simple-grid{
    grid-template-columns:1fr;
    gap:28px;
  }

  .visit-stats{
    width:100%;
  }

  .visit-stat{
    flex:1 1 130px;
  }
}

/* Balanced primary navigation */
@media (min-width:901px){

  .nav-row{
    display:flex;
    align-items:center;
    gap:24px;
  }

  .nav-row .primary-nav{
    flex:1 1 auto;
    min-width:0;
  }

  .primary-nav > ul{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .primary-nav > ul > li{
    flex:0 0 auto;
  }

  .primary-nav > ul > li > a{
    padding-left:10px;
    padding-right:10px;
    white-space:nowrap;
  }

  .header-language{
    flex:0 0 auto;
    margin-left:4px;
  }

  .lang-switcher{
    display:flex;
    align-items:center;
    gap:2px;
  }

  .lang-switcher a,
  .lang-switcher span{
    padding:6px 5px;
  }
}

/* Right-side navigation tools */
.nav-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.faculty-login-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border-radius:9px;
  background:var(--hnue-blue);
  color:#fff;
  font-size:.84rem;
  font-weight:750;
  white-space:nowrap;
  box-shadow:0 6px 16px rgba(0,100,180,.18);
}

.faculty-login-button:hover{
  color:#fff;
  text-decoration:none;
  filter:brightness(.96);
}

.nav-tools .header-language{
  margin-left:0;
}

.nav-tools .lang-switcher{
  display:flex;
  align-items:center;
  gap:2px;
}

@media (min-width:901px){
  .nav-row{
    gap:18px;
  }

  .nav-row .primary-nav{
    flex:1 1 auto;
  }

  .nav-tools{
    margin-left:8px;
  }
}

@media(max-width:900px){
  .nav-tools{
    margin-left:auto;
    order:2;
  }

  .faculty-login-button{
    min-height:34px;
    padding:7px 11px;
    font-size:.78rem;
  }
}

/* =========================================================
   Final layout fixes:
   1. Banner login button right aligned
   2. Dropdown menus always above page content
   3. Wide layouts for pages and archives
   ========================================================= */

/* --- Banner action: bottom-right, aligned with site container --- */
.faculty-banner-actions{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  pointer-events:none;
  z-index:30;
}

.faculty-banner-actions .faculty-login-button{
  pointer-events:auto;
  margin-bottom:12px;
}

/* --- Navigation stacking and dropdown visibility --- */
.primary-nav-bar{
  position:sticky;
  top:0;
  z-index:5000;
  overflow:visible !important;
}

.nav-row,
.primary-nav,
.primary-nav > ul,
.primary-nav li{
  overflow:visible !important;
}

.primary-nav{
  position:relative;
  z-index:5001;
}

.primary-nav .sub-menu{
  z-index:6000 !important;
}

.primary-nav .sub-menu .sub-menu{
  z-index:6001 !important;
}

/* Ensure page content never paints over navigation dropdowns */
#main{
  position:relative;
  z-index:1;
}

/* --- Wider inner pages --- */

/* General pages: use same maximum width as homepage */
body.page .content-wrap{
  width:min(calc(100% - 40px),var(--hnue-max));
}

/* Category, taxonomy and archive pages */
body.archive .content-wrap,
body.category .content-wrap,
body.tax .content-wrap{
  width:min(calc(100% - 40px),var(--hnue-max));
}

/* News landing and similar structured pages */
.news-landing{
  width:min(calc(100% - 40px),var(--hnue-max));
}

/* Long-form single posts remain narrower for readability */
body.single-post .content-wrap{
  width:min(calc(100% - 40px),var(--hnue-article-width,1180px));
}

/* Mobile keeps normal safe margins */
@media(max-width:620px){
  body.page .content-wrap,
  body.archive .content-wrap,
  body.category .content-wrap,
  body.tax .content-wrap,
  .news-landing,
  body.single-post .content-wrap{
    width:min(calc(100% - 28px),var(--hnue-max));
  }

  .faculty-banner-actions .faculty-login-button{
    margin-bottom:8px;
  }
}

/* Final dropdown visual refinement */
@media (min-width:901px){

  .primary-nav .sub-menu{
    top:calc(100% + 6px);
    background:#fff !important;
    border:1px solid rgba(219,230,239,.95);
    box-shadow:0 18px 42px rgba(16,36,62,.16);
    border-radius:12px;
    padding:10px;
  }

  .primary-nav .sub-menu li{
    background:#fff;
  }

  .primary-nav .sub-menu a{
    background:#fff;
    border-radius:8px;
  }

  .primary-nav .sub-menu a:hover{
    background:var(--hnue-bg);
  }
}

/* Fix dropdown stacking context */
.site-header{
  position:relative;
  z-index:9000;
  overflow:visible !important;
}

.primary-nav-bar{
  z-index:9100;
  overflow:visible !important;
}

.primary-nav{
  z-index:9200;
}

.primary-nav .sub-menu{
  z-index:9300 !important;
}

.primary-nav .sub-menu .sub-menu{
  z-index:9400 !important;
}

/* Main content must not create a competing stacking context */
#main{
  position:static !important;
  z-index:auto !important;
}

/* Stabilize desktop dropdown hover */
@media (min-width:901px){

  .primary-nav .menu-item-has-children{
    position:relative;
  }

  .primary-nav .sub-menu{
    top:100% !important;
    margin-top:0 !important;
  }

  .primary-nav .menu-item-has-children > .sub-menu::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:-8px;
    height:8px;
    background:transparent;
  }

  .primary-nav li:hover > .sub-menu,
  .primary-nav li:focus-within > .sub-menu{
    display:block;
  }
}

/* === Final fix: stable third-level desktop submenu === */
@media (min-width:901px){

  /* Third level opens directly beside its parent item */
  .primary-nav .sub-menu .menu-item-has-children > .sub-menu{
    top:0 !important;
    left:100% !important;
    margin-top:0 !important;
    margin-left:0 !important;
  }

  /* Horizontal hover bridge between level 2 and level 3 */
  .primary-nav .sub-menu .menu-item-has-children > .sub-menu::before{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    left:-8px;
    right:auto;
    width:8px;
    height:auto;
    background:transparent;
  }

  .primary-nav .sub-menu .menu-item-has-children:hover > .sub-menu,
  .primary-nav .sub-menu .menu-item-has-children:focus-within > .sub-menu{
    display:block;
  }
}

/* === HNUE Physics: Structured person profile records === */

.person-structured-list{
  display:grid;
  gap:16px;
}

.person-record{
  padding:20px 22px;
  border:1px solid var(--hnue-line);
  border-radius:16px;
  background:#fff;
}

.person-record h3{
  margin:0 0 8px;
  font-size:1.05rem;
  line-height:1.4;
}

.person-record-period{
  margin-bottom:12px;
  color:var(--hnue-muted);
  font-size:.9rem;
  font-weight:600;
}

.person-record p{
  margin:8px 0 0;
  line-height:1.65;
}

.person-record a{
  color:var(--hnue-blue);
  font-weight:650;
}

.person-section-content{
  padding:20px 22px;
  border:1px solid var(--hnue-line);
  border-radius:16px;
  background:#fff;
  font-size:1rem;
  line-height:1.75;
}

.person-section-content > :first-child{
  margin-top:0;
}

.person-section-content > :last-child{
  margin-bottom:0;
}

@media(max-width:620px){
  .person-record,
  .person-section-content{
    padding:16px 17px;
    border-radius:14px;
  }
}


/* === HNUE Physics: Refine structured profile cards === */

.person-record{
  background:var(--hnue-bg);
}

.person-record h3{
  font-weight:750;
}

.person-record p strong{
  font-weight:700;
}

.person-structured-list{
  margin-top:2px;
}

.person-section + .person-section{
  margin-top:38px;
}


/* === HNUE Physics: Person profile title sizing === */

.person-profile-summary .entry-title{
  font-size:clamp(2.15rem,4vw,3.15rem);
  line-height:1.08;
}


/* HPC HISTORY LANDING WIDTH V1 - STEP 168G-253 */
/* Desktop only: preserve existing tablet/mobile layouts. */
@media (min-width: 901px) {
    body.page .content-wrap.history-landing-wrap {
        width: min(calc(100% - 48px), 1360px);
        max-width: none;
    }

    .history-landing-wrap .history-landing-header {
        max-width: 1100px;
    }

    .history-landing-wrap .history-landing-lead {
        max-width: 1000px;
    }

    .history-landing-wrap .history-timeline {
        max-width: 1240px;
    }
}
/* END HPC HISTORY LANDING WIDTH V1 */


/* HPC FACULTY PROFILE WIDTH V1 - STEP 168G-265 */
/* Expand faculty CV on desktop without changing image or mobile layout. */
@media (min-width: 901px) {
    body.single-hnue75_teacher .content-wrap.person-profile {
        width: min(calc(100% - 48px), 1360px);
        max-width: none;
    }
}
/* END HPC FACULTY PROFILE WIDTH V1 */


/* HPC WEBSITE LINKS - STEP 168G394 */

.hpc-website-links {
    padding: 42px 0;
    background: linear-gradient(
        120deg,
        #eaf5ff 0%,
        #f5faff 55%,
        #e7f8fc 100%
    );
}

.hpc-website-links-panel {
    background: #fff;
    border: 1px solid #e0ecf7;
    border-radius: 22px;
    padding: 28px 32px 32px;
    box-shadow: 0 12px 28px rgba(12, 50, 86, .06);
    min-width: 0;
}

.hpc-website-links-title {
    margin: 0 0 22px;
    padding: 0 0 15px 18px;
    position: relative;
    border-bottom: 1px solid #d9e8f7;
    color: #102744;
    font-size: 1.45rem;
    line-height: 1.35;
    font-weight: 750;
}

.hpc-website-links-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 4px;
    height: 28px;
    border-radius: 5px;
    background: linear-gradient(#00b8ef, #0064b4);
}

.hpc-website-links-track {
    display: flex;
    align-items: stretch;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding: 3px 2px 12px;
}

.hpc-website-link-card {
    flex: 0 0 175px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 12px;
    background: #fff;
    border: 1px solid #dce8f4;
    border-radius: 14px;
    text-decoration: none;
    color: #18395c;
    text-align: center;
    scroll-snap-align: start;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.hpc-website-link-card:hover,
.hpc-website-link-card:focus-visible {
    border-color: #008ed0;
    box-shadow: 0 8px 18px rgba(0,100,180,.12);
    transform: translateY(-2px);
}

.hpc-website-link-card:focus-visible {
    outline: 2px solid #0064b4;
    outline-offset: 2px;
}

.hpc-website-link-image {
    width: 100%;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpc-website-link-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hpc-website-link-name {
    font-size: .85rem;
    line-height: 1.4;
    font-weight: 650;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .hpc-website-links {
        padding: 28px 0;
    }

    .hpc-website-links-panel {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .hpc-website-links-title {
        font-size: 1.2rem;
    }

    .hpc-website-links-track {
        gap: 12px;
    }

    .hpc-website-link-card {
        flex-basis: 148px;
        padding: 12px 10px;
    }

    .hpc-website-link-image {
        height: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hpc-website-link-card {
        transition: none;
    }
}

/* END HPC WEBSITE LINKS - STEP 168G394 */


/* HPC CAROUSEL SCROLLBAR - 168G414 */

/* Hide scrollbar only when autoplay is active and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
    .hpc-website-links-track[data-autoplay="1"] {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .hpc-website-links-track[data-autoplay="1"]::-webkit-scrollbar {
        display: none;
    }
}

/* END HPC CAROUSEL SCROLLBAR - 168G414 */


/* HPC NEWS CARDS RESPONSIVE - 168G437 */

/* Two-column layouts for the homepage and archives. */
.news-grid,
.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
}

/* The first homepage story receives a full-width position. */
.news-grid > .post-card.featured {
    grid-column: 1 / -1;
}

/* Common card appearance. */
.news-grid .post-card,
.archive-grid .post-card {
    min-width: 0;
    height: 100%;
    border-radius: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.news-grid .post-card:hover,
.archive-grid .post-card:hover {
    border-color: rgba(0,100,180,.35);
    box-shadow: 0 8px 25px rgba(10,45,75,.07);
}

/* Image cards: smaller, consistent imagery. */
.news-grid .post-card.has-image .post-thumb,
.archive-grid .post-card.has-image .post-thumb {
    display: block;
    aspect-ratio: 16 / 7;
    overflow: hidden;
}

.news-grid .post-card.has-image .post-thumb img,
.archive-grid .post-card.has-image .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Text-only cards do not reserve any fake image area. */
.news-grid .post-card.no-image,
.archive-grid .post-card.no-image {
    border-left: 4px solid var(--hnue-blue, #0064b4);
    background: #fff;
}

.news-grid .post-card.no-image .post-body,
.archive-grid .post-card.no-image .post-body {
    padding: 22px 24px;
}

.news-grid .post-card.no-image h3,
.archive-grid .post-card.no-image h3 {
    overflow-wrap: anywhere;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Featured text-only stories must remain proportionate. */
.news-grid .post-card.featured.no-image h3 {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.news-grid .post-card.featured.no-image .post-body {
    padding: 26px 30px;
}

/* Tablet: preserve two columns. */
@media (max-width: 900px) {
    .news-grid,
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile: use one column with comfortable spacing. */
@media (max-width: 620px) {
    .news-grid,
    .archive-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .news-grid .post-card.no-image .post-body,
    .archive-grid .post-card.no-image .post-body,
    .news-grid .post-card.featured.no-image .post-body {
        padding: 18px 20px;
    }
}

/* END HPC NEWS CARDS RESPONSIVE - 168G437 */


/* BEGIN HPC NEWS MISSING IMAGE LIST - 168G475 */

/*
 * Compact list presentation for image-free news.
 * Activated only by the WordPress missing_image setting.
 */
.news-grid .post-card.no-image-list,
.archive-grid .post-card.no-image-list {
    border-left: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--hnue-line, #e5e7eb);
    background: transparent;
    box-shadow: none;
    height: auto;
}

.news-grid .post-card.no-image-list .post-body,
.archive-grid .post-card.no-image-list .post-body {
    padding: 14px 8px;
}

.news-grid .post-card.no-image-list h3,
.archive-grid .post-card.no-image-list h3 {
    font-size: 1.05rem;
    line-height: 1.45;
    margin: 6px 0 8px;
}

.news-grid .post-card.no-image-list .post-meta,
.archive-grid .post-card.no-image-list .post-meta {
    font-size: .82rem;
}

.news-grid .post-card.no-image-list p,
.archive-grid .post-card.no-image-list p {
    font-size: .92rem;
    line-height: 1.5;
    margin: 6px 0;
}

.news-grid .post-card.no-image-list:hover,
.archive-grid .post-card.no-image-list:hover {
    box-shadow: none;
    border-bottom-color: var(--hnue-blue, #0064b4);
}

/* Keep featured items visually distinct. */
.news-grid .post-card.featured.no-image-list h3 {
    font-size: 1.25rem;
}

/* Mobile spacing. */
@media (max-width: 620px) {
    .news-grid .post-card.no-image-list .post-body,
    .archive-grid .post-card.no-image-list .post-body {
        padding: 12px 4px;
    }
}

/* END HPC NEWS MISSING IMAGE LIST - 168G475 */


/* HPC RESEARCH YEAR GROUPS - STEP 168G-750 */
.hpc-research-directory .hpc-research-year-group {
    margin: 32px 0 42px;
}

.hpc-research-directory .hpc-research-year-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 22px;
    padding: 0 0 12px;
    border-bottom: 2px solid rgba(0, 100, 180, .18);
    color: #0064b4;
    font-size: clamp(1.4rem, 2.3vw, 1.85rem);
    font-weight: 750;
    line-height: 1.35;
}

.hpc-research-directory .hpc-research-year-heading small {
    font-size: .82rem;
    font-weight: 500;
    color: #5f7185;
}

.hpc-research-directory ol.hpc-research-list {
    padding-left: 2.6rem;
    margin: 0;
}

.hpc-research-directory .hpc-research-item {
    padding-left: 6px;
    margin-bottom: 16px;
}

.hpc-research-directory .hpc-research-item::marker {
    color: #0064b4;
    font-weight: 750;
    font-size: 1.05rem;
}

@media (max-width: 620px) {
    .hpc-research-directory .hpc-research-year-group {
        margin: 24px 0 32px;
    }

    .hpc-research-directory ol.hpc-research-list {
        padding-left: 1.9rem;
    }

    .hpc-research-directory .hpc-research-year-heading {
        gap: 7px;
        font-size: 1.35rem;
    }
}
/* END HPC RESEARCH YEAR GROUPS */


/* STEP 168G-795: Research filter responsive UI */
.hpc-research-directory .hpc-research-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 22px 24px;
    margin: 0 0 22px;
    background: #f3f8fd;
    border: 1px solid #d6e6f5;
    border-radius: 14px;
}

.hpc-research-directory .hpc-research-filters > p {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 0 1 190px;
    min-width: 150px;
    margin: 0;
}

.hpc-research-directory .hpc-research-filters > p:first-of-type {
    flex: 1 1 340px;
    min-width: 220px;
}

.hpc-research-directory .hpc-research-filters > p:last-of-type {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.hpc-research-directory .hpc-research-filters label {
    display: block;
    font-size: 14px;
    font-weight: 650;
    color: #153b63;
}

.hpc-research-directory .hpc-research-filters input[type="search"],
.hpc-research-directory .hpc-research-filters select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: #142c45;
    background: #fff;
    border: 1px solid #b8cfe3;
    border-radius: 8px;
}

.hpc-research-directory .hpc-research-filters input:focus-visible,
.hpc-research-directory .hpc-research-filters select:focus-visible,
.hpc-research-directory .hpc-research-filters button:focus-visible,
.hpc-research-directory .hpc-research-filters a:focus-visible {
    outline: 3px solid #7fc9ff;
    outline-offset: 2px;
}

.hpc-research-directory .hpc-research-filters button[type="submit"] {
    min-height: 44px;
    padding: 10px 23px;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    color: #fff;
    background: #0064b4;
    border: 1px solid #0064b4;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease;
}

.hpc-research-directory .hpc-research-filters button[type="submit"]:hover {
    background: #004c8c;
}

.hpc-research-directory .hpc-research-filters > p:last-of-type > a {
    color: #0064b4;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hpc-research-directory .hpc-research-count {
    margin: 0 0 26px;
    color: #234b72;
    font-size: 15px;
}

@media (max-width: 767px) {
    .hpc-research-directory .hpc-research-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 18px 16px;
    }

    .hpc-research-directory .hpc-research-filters > p,
    .hpc-research-directory .hpc-research-filters > p:first-of-type {
        flex: 0 1 auto;
        min-width: 0;
        width: 100%;
    }

    .hpc-research-directory .hpc-research-filters > p:last-of-type {
        justify-content: flex-start;
    }
}


/* STEP168G1686G_RESPONSIVE_CAMPAIGN_HERO */

/*
 * Images are selected in WordPress Admin.
 * These rules only control responsive rendering.
 */

.hero {
    background-image: var(--hpc-hero-desktop, none);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 767px) {
    .hero {
        background-image: var(
            --hpc-hero-mobile,
            var(--hpc-hero-desktop, none)
        );
    }
}


/* =========================================================
   STEP168G1686ZQ_HERO_SLIDER_CSS
   HNUE Physics — Event Hero Slider
   ========================================================= */

.hero.hnue-event-slider {
    position: relative;
    display: block;
    width: 100%;
    height: clamp(430px, 39vw, 620px);
    min-height: 430px;
    overflow: hidden;
    background: #173a5f;
    isolation: isolate;
}

.hnue-event-slider::before {
    content: none;
}

.hnue-slider-slides,
.hnue-slider-slide,
.hnue-slider-picture,
.hnue-slider-picture img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hnue-slider-slide {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity .7s ease, visibility .7s ease;
}

.hnue-slider-slide.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.hnue-slider-picture {
    display: block;
    overflow: hidden;
}

.hnue-slider-picture img {
    display: block;
    object-fit: cover;
    object-position: center center;
    max-width: none;
}

.hnue-slider-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(5, 24, 45, .90) 0%,
        rgba(5, 24, 45, .70) 38%,
        rgba(5, 24, 45, .30) 70%,
        rgba(5, 24, 45, .06) 100%
    );
}

.hnue-slider-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    height: 100%;
    padding-top: 35px;
    padding-bottom: 85px;
    color: #fff;
}

.hnue-slider-brand {
    max-width: 700px;
}

.hnue-slider-brand h1 {
    margin: 10px 0 0;
    max-width: 700px;
    font-size: clamp(2rem, 4.1vw, 3.9rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    color: #fff;
    text-wrap: balance;
}

.hnue-slider-event {
    max-width: 650px;
}

.hnue-slider-event h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(1.4rem, 2.5vw, 2.35rem);
    line-height: 1.25;
}

.hnue-slider-event p {
    margin: 0 0 16px;
    max-width: 600px;
    font-size: clamp(.95rem, 1.3vw, 1.1rem);
    color: rgba(255,255,255,.94);
}

.hnue-slider-event .btn {
    margin-top: 4px;
}

.hnue-slider-controls {
    position: absolute;
    z-index: 5;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(5, 24, 45, .55);
    backdrop-filter: blur(8px);
}

.hnue-slider-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.hnue-slider-controls button:hover,
.hnue-slider-controls button:focus-visible {
    background: rgba(255,255,255,.28);
    outline-offset: 3px;
}

.hnue-slider-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hnue-slider-controls .hnue-slider-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.45);
}

.hnue-slider-controls .hnue-slider-dot.is-active {
    width: 25px;
    border-radius: 10px;
    background: #fff;
}

@media (max-width: 900px) {
    .hero.hnue-event-slider {
        height: 510px;
        min-height: 460px;
    }

    .hnue-slider-content {
        padding-bottom: 88px;
    }

    .hnue-slider-brand h1 {
        font-size: clamp(2rem, 5vw, 3rem);
    }
}

@media (max-width: 620px) {
    .hero.hnue-event-slider {
        height: 510px;
        min-height: 450px;
    }

    .hnue-slider-overlay {
        background: linear-gradient(
            0deg,
            rgba(5,24,45,.93) 0%,
            rgba(5,24,45,.74) 55%,
            rgba(5,24,45,.20) 100%
        );
    }

    .hnue-slider-content {
        justify-content: flex-end;
        gap: 12px;
        padding-top: 25px;
        padding-bottom: 94px;
    }

    .hnue-slider-brand h1 {
        font-size: clamp(1.55rem, 6.2vw, 2.15rem);
        line-height: 1.15;
    }

    .hnue-slider-brand .eyebrow {
        font-size: .65rem;
    }

    .hnue-slider-event h2 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .hnue-slider-event p {
        font-size: .88rem;
        line-height: 1.45;
        margin-bottom: 10px;
    }

    .hnue-slider-event .btn {
        padding: 8px 13px;
        font-size: .85rem;
    }

    .hnue-slider-controls {
        bottom: 14px;
        gap: 10px;
        padding: 6px 10px;
    }

    .hnue-slider-controls button {
        width: 30px;
        height: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hnue-slider-slide {
        transition: none;
    }
}

/* END STEP168G1686ZQ_HERO_SLIDER_CSS */


/* =========================================================
   STEP168G1686ZZ1_SLIDER_CONTROLS_POSITION
   Prevent Quick Cards from covering slider controls.
   ========================================================= */

@media (min-width: 621px) {
    .hero.hnue-event-slider .hnue-slider-controls {
        bottom: 76px;
        z-index: 10;
    }
}

@media (max-width: 620px) {
    .hero.hnue-event-slider .hnue-slider-controls {
        bottom: 66px;
        z-index: 10;
    }
}

/* END STEP168G1686ZZ1_SLIDER_CONTROLS_POSITION */


/* =========================================================
   STEP168G1686ZAD_DISPLAY_FRONTEND
   Per-slide image fit and gradient visibility.
   ========================================================= */

/* Use a consistent dark background around contained images. */
.hero.hnue-event-slider .hnue-slider-picture {
    background-color: #102c46;
}

/* Preserve the complete image without cropping. */
.hero.hnue-event-slider
.hnue-slider-slide[data-image-fit="contain"]
.hnue-slider-picture img {
    object-fit: contain;
    object-position: center center;
}

/* Cover remains the default mode. */
.hero.hnue-event-slider
.hnue-slider-slide[data-image-fit="cover"]
.hnue-slider-picture img {
    object-fit: cover;
}

/* Disable gradient independently for each slide. */
.hero.hnue-event-slider
.hnue-slider-slide[data-overlay="0"]
.hnue-slider-overlay {
    display: none;
}

/* Gradient remains enabled by default. */
.hero.hnue-event-slider
.hnue-slider-slide[data-overlay="1"]
.hnue-slider-overlay {
    display: block;
}

/* END STEP168G1686ZAD_DISPLAY_FRONTEND */


/* =========================================================
   STEP168G1686ZAM_BRAND_DESCRIPTION
   Responsive bilingual brand description.
   ========================================================= */

.hero.hnue-event-slider .hnue-slider-brand-description {
    margin: 14px 0 0;
    max-width: 610px;
    font-size: clamp(.95rem, 1.35vw, 1.12rem);
    line-height: 1.5;
    color: rgba(255,255,255,.94);
}

@media (max-width: 620px) {
    .hero.hnue-event-slider .hnue-slider-brand-description {
        margin-top: 8px;
        max-width: 100%;
        font-size: .88rem;
        line-height: 1.4;
    }

    /* Limit vertical space when brand and event content coexist. */
    .hero.hnue-event-slider .hnue-slider-brand h1 {
        font-size: clamp(1.45rem, 5.5vw, 1.95rem);
    }
}

/* END STEP168G1686ZAM_BRAND_DESCRIPTION */
