:root {
  --blue-50: #f0f9ff;
  --blue-100: #e0f2fe;
  --blue-200: #bae6fd;
  --blue-300: #7dd3fc;
  --blue-400: #38bdf8;
  --blue-500: #0ea5e9;
  --blue-600: #0284c7;
  --blue-700: #0369a1;
  --blue-800: #075985;
  --blue-900: #0c4a6e;
  --blue-950: #082f49;

  --gold: #fbbf24;
  --gold-soft: #fde68a;

  --ink-900: #0b1220;
  --ink-700: #1e293b;
  --ink-500: #475569;
  --ink-400: #64748b;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;
  --ink-100: #e2e8f0;
  --ink-50: #f8fafc;

  --bg: #ffffff;
  --bg-alt: #f0f9ff;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 8px rgba(2, 132, 199, 0.06);
  --shadow: 0 10px 30px rgba(2, 132, 199, 0.10);
  --shadow-lg: 0 24px 60px rgba(2, 132, 199, 0.18);
  --shadow-blue: 0 20px 50px rgba(14, 165, 233, 0.25);

  --font-thai: 'IBM Plex Sans Thai', 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Prompt', 'IBM Plex Sans Thai', system-ui, sans-serif;

  --grad-primary: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  --grad-hero: linear-gradient(135deg, #082f49 0%, #0369a1 50%, #0ea5e9 100%);
  --grad-deep: linear-gradient(135deg, #0c4a6e 0%, #0ea5e9 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-thai);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-800); }

img { max-width: 100%; display: block; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ================ NAV ================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(14, 165, 233, 0.12);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-900);
}
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}
.brand-text { line-height: 1.1; }
.brand-th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--blue-900);
}
.brand-en {
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-700);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  display: inline-flex;
  align-items: center;
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-links .apply-btn {
  background: var(--grad-primary);
  color: #fff;
  padding: 11px 22px 13px 22px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .3px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}
.nav-links .apply-btn:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 10px 24px rgba(14, 165, 233, 0.5); }
.nav-links .fb-link {
  background: linear-gradient(135deg, #1877f2, #0a66c2);
  color: #fff !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  border-radius: 10px;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-links .fb-link:hover { background: linear-gradient(135deg, #0a66c2, #1877f2); color: #fff !important; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--blue-50);
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 20px;
  color: var(--blue-700);
  cursor: pointer;
}

/* ================ HERO ================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  padding: 80px 20px 120px;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(56, 189, 248, 0.4), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(14, 165, 233, 0.35), transparent 55%),
    var(--grad-hero);
  z-index: 0;
}
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.hero-particles .p {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 70%);
  animation: float linear infinite;
}
@keyframes float {
  0% { transform: translate(0,0) scale(1); opacity: .1; }
  50% { opacity: .6; }
  100% { transform: translate(var(--dx, 0), -120vh) scale(1.5); opacity: 0; }
}
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,60 C360,120 720,0 1080,60 C1260,90 1380,90 1440,60 L1440,120 L0,120 Z'/%3E%3C/svg%3E") no-repeat center bottom / cover;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1100px;
  margin: 0 auto;
}
.logo-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.univ-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.15);
  transition: transform .3s;
}
.univ-logo:hover { transform: translateY(-6px) rotate(-3deg); }
.univ-logo.program-logo {
  padding: 0;
  background: transparent;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--blue-200);
  font-weight: 600;
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 30px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.title-thai {
  display: block;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 400;
  color: var(--blue-100);
  margin-bottom: 6px;
}
.title-major {
  display: block;
  font-size: clamp(38px, 7vw, 74px);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #7dd3fc 70%, #fde68a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.title-english {
  display: block;
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 400;
  color: var(--blue-100);
  margin-top: 8px;
  font-style: italic;
}
.hero-tagline {
  font-size: clamp(14px, 1.6vw, 17px);
  color: rgba(255,255,255,0.9);
  line-height: 2;
  margin-bottom: 40px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 44px;
}
.stat {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 18px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  min-width: 130px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--blue-200);
  margin-top: 6px;
  letter-spacing: 0.05em;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all .25s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0c4a6e;
  box-shadow: 0 12px 28px rgba(251, 191, 36, 0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(251, 191, 36, 0.55); color: #0c4a6e;}
.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); color: #fff; transform: translateY(-3px); }

/* ================ SECTIONS ================ */
.section {
  padding: 100px 0;
  position: relative;
}
.section-alt {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}
.section-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 56px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--blue-600);
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--blue-950);
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.lead {
  font-size: 17px;
  color: var(--ink-500);
  line-height: 1.85;
}

/* ================ ABOUT ================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--ink-100);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}
.info-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 70%);
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
  border-color: var(--blue-200);
}
.info-icon {
  font-size: 32px;
  margin-bottom: 14px;
  display: inline-block;
  padding: 10px;
  background: var(--blue-50);
  border-radius: 12px;
  line-height: 1;
}
.info-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--blue-800);
  margin-bottom: 10px;
}
.info-card p {
  font-size: 14.5px;
  color: var(--ink-500);
  line-height: 1.75;
}
.info-card small { color: var(--ink-400); font-size: 12px; }

.highlight-card {
  background: linear-gradient(135deg, var(--blue-50) 0%, #fff 50%, #fff 100%);
  border-color: var(--blue-200);
}
.career-list {
  list-style: none;
  font-size: 14.5px;
  color: var(--ink-700);
}
.career-list li {
  padding: 6px 0 6px 26px;
  position: relative;
}
.career-list li::before {
  content: '→';
  position: absolute;
  left: 6px;
  color: var(--blue-500);
  font-weight: 700;
}

/* ================ PHILOSOPHY ================ */
.philosophy-hero {
  max-width: 900px;
  margin: 0 auto 60px;
}
.philosophy-quote {
  position: relative;
  padding: 50px 60px 40px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-blue);
  overflow: hidden;
}
.philosophy-quote::before, .philosophy-quote::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
}
.philosophy-quote::before {
  width: 200px; height: 200px;
  top: -50px; left: -50px;
}
.philosophy-quote::after {
  width: 280px; height: 280px;
  bottom: -120px; right: -80px;
}
.quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 120px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: -40px;
  opacity: 0.9;
}
.philosophy-quote p {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.3vw, 24px);
  font-weight: 500;
  line-height: 1.9;
  color: #fff;
  position: relative;
}
.quote-src {
  margin-top: 22px;
  color: var(--blue-100);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 64px;
}
.pillar {
  background: #fff;
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--blue-300);
}
.pillar-icon { font-size: 30px; margin-bottom: 8px; }
.pillar h4 {
  font-size: 14px;
  color: var(--blue-800);
  font-weight: 600;
}

.tab-group {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tab-buttons {
  display: flex;
  gap: 0;
  background: var(--blue-50);
  padding: 8px;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1 1 200px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-500);
  transition: all .2s;
}
.tab-btn.active {
  background: #fff;
  color: var(--blue-700);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.18);
  font-weight: 600;
}
.tab-pane {
  padding: 36px;
  display: none;
  animation: fadeIn .3s;
}
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.peo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.peo-card {
  padding: 26px;
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .3s;
}
.peo-card:hover { transform: translateY(-6px); }
.peo-card .peo-code {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.8;
  margin-bottom: 16px;
}
.peo-card p { font-size: 14.5px; line-height: 1.75; color: rgba(255,255,255,0.95); }
.peo-card:nth-child(1) { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.peo-card:nth-child(2) { background: linear-gradient(135deg, #2563eb, #4f46e5); }
.peo-card:nth-child(3) { background: linear-gradient(135deg, #0891b2, #0e7490); }
.peo-card:nth-child(4) { background: linear-gradient(135deg, #0c4a6e, #0ea5e9); }

.plo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plo-item {
  background: var(--blue-50);
  border-left: 5px solid var(--blue-500);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  transition: transform .2s, background .2s;
}
.plo-item:hover { background: var(--blue-100); transform: translateX(4px); }
.plo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.plo-code {
  background: var(--blue-700);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.plo-desc {
  font-size: 15px;
  color: var(--ink-700);
  font-weight: 500;
}
.sub-plos {
  margin-top: 12px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.sub-plo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-500);
  line-height: 1.7;
}
.sub-plo b {
  color: var(--blue-700);
  font-weight: 600;
  white-space: nowrap;
}

.significance-text p { margin-bottom: 16px; font-size: 15px; line-height: 1.9; color: var(--ink-700); }
.discipline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.discipline-badges span {
  background: var(--blue-100);
  color: var(--blue-800);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

/* ================ STRUCTURE ================ */
.structure-viz {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}
.structure-bar {
  display: flex;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.15);
}
.structure-seg {
  position: relative;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  transition: flex-grow .3s;
}
.structure-seg:hover { flex-grow: 1.05; }
.structure-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--blue-50);
  transition: background .2s;
}
.legend-item:hover { background: var(--blue-100); }
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.legend-body { flex: 1; }
.legend-title {
  font-weight: 600;
  color: var(--blue-900);
  font-size: 14px;
}
.legend-sub { font-size: 12.5px; color: var(--ink-500); line-height: 1.6; }

.year-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.year-tab {
  background: #fff;
  border: 2px solid var(--ink-100);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
  color: var(--ink-500);
}
.year-tab:hover { border-color: var(--blue-300); transform: translateY(-3px); }
.year-tab.active {
  background: var(--grad-primary);
  border-color: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.year-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.year-sub {
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.85;
}

.year-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 860px) { .year-content { grid-template-columns: 1fr; } }

.semester-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-100);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s;
}
.semester-card:hover { box-shadow: var(--shadow); }
.semester-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--blue-100);
  margin-bottom: 16px;
}
.semester-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--blue-900);
}
.semester-credits {
  background: var(--blue-600);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.semester-courses {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-course {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink-50);
  transition: background .2s;
  cursor: pointer;
}
.plan-course:hover { background: var(--blue-50); }
.plan-course .pc-code {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-700);
  font-size: 13.5px;
  white-space: nowrap;
}
.plan-course .pc-name {
  font-size: 14.5px;
  color: var(--ink-700);
}
.plan-course .pc-en {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 2px;
}
.plan-course .pc-credits {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
  white-space: nowrap;
}
.pc-group-chip {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip-ge { background: #dbeafe; color: #1e40af; }
.chip-ed { background: #fef3c7; color: #92400e; }
.chip-major { background: #d1fae5; color: #065f46; }
.chip-elective { background: #e9d5ff; color: #6b21a8; }
.chip-internship { background: #fecaca; color: #991b1b; }

/* ================ COURSES ================ */
.course-filter-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.course-search {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--ink-100);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.course-search:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}
.course-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.course-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ink-200);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-500);
  transition: all .2s;
  font-weight: 500;
}
.course-chip:hover { border-color: var(--blue-300); color: var(--blue-700); }
.course-chip.active {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
}
.course-chip .count {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.1);
  font-size: 11px;
}
.course-chip.active .count { background: rgba(255,255,255,0.25); }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  justify-content: center;
  gap: 16px;
}
.course-card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-100);
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.course-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.course-card .cc-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--blue-600);
  letter-spacing: 0.02em;
}
.course-card .cc-thai {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-900);
  margin: 6px 0 4px;
  line-height: 1.4;
}
.course-card .cc-english {
  font-size: 12.5px;
  color: var(--ink-400);
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.5;
}
.course-card .cc-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.course-card .cc-credits {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  background: var(--ink-50);
  padding: 4px 10px;
  border-radius: 999px;
}
.course-card .cc-desc {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--ink-200);
  font-size: 13.5px;
  color: var(--ink-500);
  line-height: 1.75;
}
.course-card.expanded .cc-desc { display: block; }

/* ================ FACULTY ================ */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.faculty-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--ink-100);
  overflow: hidden;
  transition: all .3s;
}
.faculty-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-blue);
  border-color: var(--blue-200);
}
.faculty-avatar {
  height: 140px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 58px;
  font-weight: 700;
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
}
.faculty-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.3), transparent 50%);
}
.faculty-body { padding: 22px 24px; }
.faculty-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--blue-900);
  margin-bottom: 4px;
}
.faculty-position {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  font-weight: 600;
  margin-bottom: 14px;
}
.faculty-quals {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.7;
  border-top: 1px dashed var(--ink-200);
  padding-top: 12px;
  margin-top: 12px;
}
.faculty-quals .q {
  display: block;
  padding: 2px 0;
}
.faculty-responsible {
  display: inline-block;
  background: var(--gold-soft);
  color: #92400e;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* ================ PRACTICUM ================ */
.practicum-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.kpi {
  background: #fff;
  padding: 22px 18px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--ink-100);
  transition: all .3s;
}
.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--blue-200);
}
.kpi-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--blue-700);
  line-height: 1;
}
.kpi-label {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 8px;
  line-height: 1.5;
}

.practicum-controls {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: end;
}
.filter-group .filter-label {
  font-size: 12px;
  color: var(--ink-400);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.seg-control {
  display: flex;
  background: var(--blue-50);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.seg-btn {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
  transition: all .2s;
}
.seg-btn.active {
  background: #fff;
  color: var(--blue-700);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
}
.pretty-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--ink-200);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  color: var(--ink-700);
}
.pretty-select:focus { outline: none; border-color: var(--blue-400); }

.subhead {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--blue-900);
  margin-bottom: 16px;
}

.practicum-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}
@media (max-width: 1000px) { .practicum-grid { grid-template-columns: 1fr; } }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  height: 520px;
  box-shadow: var(--shadow);
  border: 1px solid var(--ink-100);
}
#map { width: 100%; height: 100%; }
.map-legend {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-500);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.sup-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}
.sup-card {
  background: #fff;
  border: 1.5px solid var(--ink-100);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sup-card:hover { border-color: var(--blue-300); transform: translateX(3px); }
.sup-card.active {
  background: var(--blue-50);
  border-color: var(--blue-500);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
}
.sup-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
}
.sup-info { flex: 1; min-width: 0; }
.sup-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--blue-900);
  line-height: 1.35;
}
.sup-count {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 2px;
}
.sup-count b { color: var(--blue-600); }

.student-list-wrap {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.student-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 6px;
}
.student-item {
  background: var(--ink-50);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
}
.student-item:hover {
  background: #fff;
  border-color: var(--blue-200);
  box-shadow: var(--shadow-sm);
}
.student-item .si-avatar {
  width: 32px;
  height: 32px;
  background: var(--blue-100);
  color: var(--blue-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  flex-shrink: 0;
}
.student-item .si-body { min-width: 0; }
.student-item .si-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-item .si-sub {
  font-size: 11.5px;
  color: var(--ink-400);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-item .si-year {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.yr-4 { background: #0284c7; }
.yr-3 { background: #0891b2; }
.yr-2 { background: #0ea5e9; }

/* ================ QA ================ */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}
.qa-card {
  padding: 28px;
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .3s;
}
.qa-card:hover { transform: translateY(-6px); }
.qa-emoji {
  font-size: 40px;
  margin-bottom: 16px;
  display: inline-block;
}
.qa-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.qa-desc {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.92);
}
.qa-green  { background: linear-gradient(135deg, #059669, #065f46); }
.qa-blue   { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.qa-amber  { background: linear-gradient(135deg, #f59e0b, #b45309); }
.qa-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.qa-rose   { background: linear-gradient(135deg, #e11d48, #9f1239); }
.qa-teal   { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.qa-highlight-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #fff;
  align-items: center;
  box-shadow: var(--shadow-blue);
}
@media (max-width: 760px) { .qa-highlight-banner { grid-template-columns: 1fr; text-align: center; } }
.banner-big-num {
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.banner-sub { font-size: 14px; color: var(--blue-100); letter-spacing: 0.1em; text-transform: uppercase; }
.banner-text b {
  font-family: var(--font-display);
  font-size: 22px;
  display: block;
  margin-bottom: 10px;
}
.banner-text p { font-size: 14.5px; color: rgba(255,255,255,0.92); line-height: 1.85; }
.banner-bubble {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  padding: 26px 30px;
  border-radius: 20px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
}
.bubble-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.bubble-label {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  margin-top: 6px;
  line-height: 1.4;
}

/* ================ APPLY ================ */
.section-apply {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--blue-50) 0%, #fff 100%);
}
.apply-box {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}
.apply-box::before, .apply-box::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 60%);
}
.apply-box::before { width: 400px; height: 400px; top: -200px; left: -100px; }
.apply-box::after { width: 500px; height: 500px; bottom: -250px; right: -150px; background: radial-gradient(circle, rgba(125, 211, 252, 0.25), transparent 60%); }
.apply-box h2 {
  color: #fff;
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 18px;
  position: relative;
}
.apply-box h2 .accent {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.apply-box p {
  color: var(--blue-100);
  margin-bottom: 32px;
  position: relative;
  font-size: 16px;
  line-height: 1.85;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.apply-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ================ FOOTER ================ */
.footer {
  background: linear-gradient(180deg, #0c4a6e 0%, #082f49 100%);
  color: var(--blue-100);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
  margin-bottom: 50px;
}
.footer-col h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}
.footer-col p { font-size: 13.5px; color: var(--blue-100); line-height: 1.8; }
.footer-col small { color: var(--blue-300); font-size: 11.5px; }
.footer-col ul { list-style: none; }
.footer-col ul li { padding: 3px 0; }
.footer-col ul a { color: var(--blue-100); font-size: 13.5px; }
.footer-col ul a:hover { color: var(--gold); }
.footer-logo-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.footer-logo-row img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  padding: 6px;
}
.footer-logo-row img:last-child { padding: 0; background: transparent; }
.footer-desc {
  font-size: 14px;
  color: var(--blue-100);
  line-height: 1.85;
}
.developed-by {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  text-align: center;
}
.dev-line {
  font-family: var(--font-display);
  font-size: 16px;
  color: #fff;
  margin-bottom: 6px;
}
.dev-line b { color: var(--gold); font-weight: 600; }
.dev-sub { font-size: 13px; color: var(--blue-200); margin-bottom: 12px; }
.dev-year { font-size: 11.5px; color: var(--blue-300); letter-spacing: 0.05em; }

/* ================ MODAL ================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; animation: fadeIn .2s; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 47, 73, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: popIn .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--ink-50);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-500);
  z-index: 2;
  transition: all .2s;
}
.modal-close:hover { background: var(--blue-100); color: var(--blue-700); }
.modal-body {
  padding: 28px;
  overflow-y: auto;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    padding: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    display: none;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .year-tabs { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 60px 20px 100px; min-height: auto; }
  .logo-row { gap: 16px; }
  .univ-logo { width: 68px; height: 68px; }
  .stat { min-width: 110px; padding: 14px 16px; }
  .stat-num { font-size: 28px; }
  .philosophy-quote { padding: 30px 22px 24px; }
  .quote-mark { font-size: 80px; margin-bottom: -30px; }
  .tab-pane { padding: 20px; }
}

/* Custom scrollbars for overflow areas */
.sup-cards::-webkit-scrollbar,
.student-list::-webkit-scrollbar {
  width: 6px;
}
.sup-cards::-webkit-scrollbar-thumb,
.student-list::-webkit-scrollbar-thumb {
  background: var(--blue-200);
  border-radius: 10px;
}
.sup-cards::-webkit-scrollbar-thumb:hover,
.student-list::-webkit-scrollbar-thumb:hover {
  background: var(--blue-400);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--ink-400);
  font-size: 14.5px;
}

/* Leaflet marker pulse */
.pulse-marker {
  background: transparent !important;
  border: none !important;
}
.pulse-dot {
  border-radius: 50%;
  background: #0ea5e9;
  border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.55);
  animation: pulse 2s infinite;
  cursor: pointer;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

/* ================================================================
   ADDITIONAL STYLES for app.js-rendered components
================================================================ */

/* --- Hero particles (app.js creates .particle spans) --- */
.hero-particles .particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 70%);
  animation: floatUp linear infinite;
  pointer-events: none;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  20%  { opacity: .8; }
  100% { transform: translateY(-120vh) scale(1.4); opacity: 0; }
}

/* --- Nav scrolled state --- */
.nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 16px rgba(12, 74, 110, 0.08);
}

/* --- Structure bar number badge --- */
.seg-num {
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: 0.02em;
}

/* --- Structure legend alt classes --- */
.legend-swatch {
  width: 18px; height: 18px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 3px;
}
.legend-text { flex: 1; min-width: 0; }
.legend-name { font-size: 14.5px; color: var(--ink-800); line-height: 1.5; margin-bottom: 4px; }
.legend-sub  { font-size: 12.5px; color: var(--ink-500); line-height: 1.75; }

/* --- PEO extra bits --- */
.peo-icon {
  font-size: 36px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}
.peo-desc { font-size: 14.5px; line-height: 1.75; color: rgba(255,255,255,0.95); }

/* --- PLO expand / sub-plos --- */
.plo-expand {
  color: var(--blue-500);
  font-size: 18px;
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}
.plo-item.expanded .plo-expand { transform: rotate(180deg); }
.sub-plo-list {
  display: none;
  padding: 16px 20px 4px 36px;
  border-top: 1px dashed var(--blue-200);
  margin-top: 10px;
  gap: 10px;
}
.plo-item.expanded .sub-plo-list { display: flex; flex-direction: column; }
.sub-plo-list .sub-plo {
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--blue-50);
}
.sub-plo-list .sub-plo:hover { background: var(--blue-100); }
.sub-code {
  font-weight: 700;
  color: var(--blue-700);
  font-size: 13px;
  font-family: 'Prompt', sans-serif;
  flex-shrink: 0;
  min-width: 74px;
}
.sub-desc { font-size: 13.5px; color: var(--ink-700); line-height: 1.7; }

/* --- Year motto --- */
.year-motto {
  margin-top: 18px;
  margin-bottom: 22px;
  padding: 22px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 12px 30px rgba(3, 105, 161, 0.28);
}
.year-motto-num {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.08em;
  color: var(--gold);
  flex-shrink: 0;
}
.year-motto-text {
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.95);
}

/* --- Semester grid (app.js uses .semester-grid + new inner classes) --- */
.semester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.sem-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(120deg, var(--blue-50), #fff);
  border-bottom: 1px solid var(--blue-100);
}
.sem-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--blue-800);
}
.sem-total {
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-600);
  background: var(--blue-100);
  padding: 4px 12px;
  border-radius: 100px;
}
.sem-courses {
  padding: 6px 4px;
}
.sem-course {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  margin: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  border-left: 4px solid transparent;
}
.sem-course:hover {
  background: var(--blue-50);
  transform: translateX(3px);
}
.sc-code {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--blue-700);
  letter-spacing: 0.02em;
}
.sc-title {
  font-size: 14px;
  color: var(--ink-700);
  line-height: 1.5;
}
.sc-credits {
  font-size: 12px;
  color: var(--ink-400);
  font-weight: 600;
  white-space: nowrap;
}

/* --- Course group colors (applied to .sem-course and .course-tile) --- */
.group-general_education { border-left-color: #3b82f6; }
.group-general_education .sc-code, .group-general_education .ct-code { color: #1e40af; }
.group-teacher_profession { border-left-color: #f59e0b; }
.group-teacher_profession .sc-code, .group-teacher_profession .ct-code { color: #92400e; }
.group-major_required { border-left-color: #10b981; }
.group-major_required .sc-code, .group-major_required .ct-code { color: #065f46; }
.group-major_elective { border-left-color: #8b5cf6; }
.group-major_elective .sc-code, .group-major_elective .ct-code { color: #6d28d9; }
.group-elective { border-left-color: #ec4899; }
.group-elective .sc-code, .group-elective .ct-code { color: #9d174d; }

/* --- Course tile (grid display) --- */
.course-tile {
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 2px 10px rgba(12, 74, 110, 0.05);
  border-top: 4px solid var(--blue-200);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 4px solid transparent;
}
.course-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(12, 74, 110, 0.14);
}
.ct-group {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-500);
  font-weight: 600;
}
.ct-code {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-700);
}
.ct-thai {
  font-size: 14.5px;
  color: var(--ink-800);
  font-weight: 600;
  line-height: 1.5;
}
.ct-english {
  font-size: 12.5px;
  color: var(--ink-500);
  font-style: italic;
  line-height: 1.55;
}
.ct-credits {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--ink-500);
  padding-top: 10px;
  border-top: 1px dashed var(--blue-100);
}

/* --- Faculty cards (fc-*) --- */
.fc-avatar {
  width: 86px; height: 86px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 38px;
  margin: 28px auto 14px;
  box-shadow: 0 12px 30px rgba(3, 105, 161, 0.28);
}
.fc-name {
  text-align: center;
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--blue-900);
  padding: 0 22px;
  margin-bottom: 4px;
}
.fc-role {
  text-align: center;
  font-size: 12.5px;
  color: var(--blue-600);
  margin-bottom: 16px;
  font-weight: 500;
}
.fc-section {
  padding: 12px 22px;
  border-top: 1px dashed var(--blue-100);
}
.fc-sub {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-500);
  font-weight: 700;
  margin-bottom: 8px;
}
.fc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fc-list li {
  font-size: 12.5px;
  color: var(--ink-600);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}
.fc-list li::before {
  content: '▪';
  color: var(--blue-400);
  position: absolute;
  left: 0;
}
.fc-list li b { color: var(--blue-700); font-weight: 600; }
.fc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fc-tag {
  font-size: 12px;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--blue-100);
}

/* --- Practicum supervisor card inner --- */
.sup-main { flex: 1; min-width: 0; }
.sup-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.sup-pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 500;
  border: 1px solid var(--blue-100);
}
.sup-pill-total {
  background: linear-gradient(120deg, var(--blue-500), var(--blue-700));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

/* --- Student list (sl-*) --- */
.sl-sup-block {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(12, 74, 110, 0.06);
}
.sl-sup-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(120deg, var(--blue-600), var(--blue-800));
  color: #fff;
}
.sl-sup-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.sl-sup-name { flex: 1; font-weight: 600; font-size: 15.5px; }
.sl-sup-count {
  background: rgba(255,255,255,0.22);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}
.sl-year-block { padding: 6px 0; border-top: 1px solid var(--blue-50); }
.sl-year-head {
  padding: 10px 22px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: 0.03em;
}
.sl-rows { display: flex; flex-direction: column; }
.sl-row {
  display: grid;
  grid-template-columns: 110px 1fr 220px 130px 44px;
  gap: 14px;
  align-items: center;
  padding: 10px 22px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.sl-row:hover {
  background: var(--blue-50);
  border-left-color: var(--blue-500);
}
.sl-code {
  font-family: 'Prompt', sans-serif;
  font-size: 12.5px;
  color: var(--blue-600);
  font-weight: 600;
}
.sl-name { font-size: 14px; color: var(--ink-800); font-weight: 500; }
.sl-school { font-size: 12.5px; color: var(--ink-600); }
.sl-phone { font-size: 12.5px; color: var(--ink-500); font-family: 'Prompt', sans-serif; }
.sl-detail {
  background: var(--blue-100);
  color: var(--blue-700);
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s ease;
}
.sl-row:hover .sl-detail { background: var(--blue-500); color: #fff; }

/* --- Modal: course view --- */
.modal-course, .modal-student {
  color: var(--ink-800);
}
.mc-chip {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--blue-100);
  color: var(--blue-700);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
  font-weight: 600;
}
.mc-code {
  font-family: 'Prompt', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: 0.02em;
}
.mc-thai {
  font-family: 'Prompt', sans-serif;
  font-size: 24px;
  color: var(--blue-900);
  margin: 6px 0 4px;
  line-height: 1.35;
}
.mc-english {
  font-size: 14px;
  color: var(--ink-500);
  font-style: italic;
  margin-bottom: 10px;
}
.mc-credits {
  font-size: 14px;
  color: var(--ink-700);
}
.mc-credits b { color: var(--blue-700); }
.mc-divider {
  margin: 18px 0 12px;
  border-top: 2px solid var(--blue-100);
}
.mc-desc-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-500);
  font-weight: 700;
  margin-bottom: 8px;
}
.mc-desc {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-700);
  text-align: justify;
}
.mc-hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-400);
  background: var(--blue-50);
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--blue-300);
}

/* --- Modal: student view --- */
.ms-avatar {
  width: 86px; height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 38px;
  margin: 0 auto 16px;
  box-shadow: 0 10px 24px rgba(3, 105, 161, 0.3);
}
.ms-name {
  text-align: center;
  font-family: 'Prompt', sans-serif;
  font-size: 22px;
  color: var(--blue-900);
  margin-bottom: 4px;
}
.ms-code {
  text-align: center;
  font-size: 13px;
  color: var(--ink-500);
  font-family: 'Prompt', sans-serif;
  margin-bottom: 10px;
}
.ms-chip {
  display: block;
  width: fit-content;
  margin: 0 auto;
  background: var(--blue-100);
  color: var(--blue-700);
  padding: 4px 14px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13px;
}
.ms-divider {
  margin: 20px 0 6px;
  border-top: 2px solid var(--blue-100);
}
.ms-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--blue-100);
  gap: 14px;
}
.ms-row:last-child { border-bottom: none; }
.ms-k {
  font-size: 13px;
  color: var(--ink-500);
  flex-shrink: 0;
  font-weight: 500;
}
.ms-v {
  font-size: 14px;
  color: var(--ink-800);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

/* --- Map popup + count label --- */
.map-count-label { background: transparent !important; border: none !important; }
.map-count-label > div {
  background: #fff;
  color: var(--blue-800);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.45);
  border: 2px solid var(--blue-500);
}
.map-popup { font-family: 'IBM Plex Sans Thai', sans-serif; }
.mp-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  color: var(--blue-800);
  font-size: 15px;
  margin-bottom: 4px;
}
.mp-count {
  font-size: 13px;
  color: var(--ink-600);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--blue-200);
}
.mp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  max-height: 220px;
  overflow-y: auto;
}
.mp-list li {
  padding: 6px 0;
  border-bottom: 1px dotted var(--blue-100);
  line-height: 1.55;
}
.mp-list li:last-child { border-bottom: none; }

/* --- Empty state (grid-safe) --- */
.empty {
  grid-column: 1 / -1;
  padding: 36px;
  text-align: center;
  color: var(--ink-400);
  font-size: 14.5px;
  background: var(--blue-50);
  border-radius: 12px;
  border: 2px dashed var(--blue-200);
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Apply CTAs spacing --- */
.apply-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --- Responsive for student list --- */
@media (max-width: 900px) {
  .sl-row {
    grid-template-columns: 100px 1fr 40px;
    grid-template-rows: auto auto;
    row-gap: 4px;
  }
  .sl-school, .sl-phone {
    grid-column: 1 / span 2;
    grid-row: 2;
  }
  .sl-phone { justify-self: end; }
  .semester-grid { grid-template-columns: 1fr; }
  .practicum-grid { grid-template-columns: 1fr; }
  .practicum-controls { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sem-course { grid-template-columns: 80px 1fr auto; }
  .year-motto { flex-direction: column; text-align: center; gap: 10px; }
  .year-motto-num { font-size: 24px; }
}

/* ============================================================
   FACULTY (v2) — counts, section subheads, badges, expertise
============================================================ */
.subhead-hint {
  color: var(--ink-500);
  font-size: 14px;
  margin: -4px 0 18px 0;
  line-height: 1.6;
}
.subhead-resp { color: var(--blue-800); }
.subhead-resp::before { content: ''; }
.subhead-curr { color: #14b8a6; }

.faculty-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 32px 0;
}
.fc-count-item {
  background: linear-gradient(135deg, var(--blue-50) 0%, #fff 100%);
  border: 2px solid var(--blue-200);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(3,105,161,.08);
}
.fc-count-item.fc-count-total {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-500));
  color: #fff;
  border-color: var(--blue-500);
}
.fc-count-num {
  font-family: 'Playfair Display', 'Prompt', serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--blue-800);
  line-height: 1;
}
.fc-count-item.fc-count-total .fc-count-num { color: #fff; }
.fc-count-label {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-600);
  font-weight: 500;
}
.fc-count-item.fc-count-total .fc-count-label { color: rgba(255,255,255,.88); }

/* Faculty card badges + ranks + expertise chips */
.fc-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-600);
  letter-spacing: .3px;
  box-shadow: 0 2px 6px rgba(3,105,161,.25);
}
.fc-badge.resp { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.fc-badge.curr { background: linear-gradient(135deg,#14b8a6,#0ea5e9); }
.faculty-card { position: relative; }
.fc-rank {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0 10px;
}
.fc-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.fc-exp {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-700);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
}
.fc-more {
  margin-top: 12px;
  font-size: 12px;
  color: var(--blue-500);
  font-weight: 600;
  text-align: center;
  opacity: .9;
  padding-top: 10px;
  border-top: 1px dashed var(--blue-200);
}
.fc-empty { color: var(--ink-400); font-style: italic; }

@media (max-width: 700px) {
  .faculty-counts { grid-template-columns: 1fr; }
}

/* ============================================================
   TQF HIGHLIGHTS section
============================================================ */
.tqf-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
.tqf-kpi {
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  border: 2px solid var(--blue-100);
  box-shadow: 0 6px 20px rgba(3,105,161,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tqf-kpi:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(3,105,161,.15);
}
.tqf-kpi-icon {
  font-size: 32px;
  margin-bottom: 6px;
}
.tqf-kpi-num {
  font-family: 'Playfair Display', 'Prompt', serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
}
.tqf-kpi-label {
  font-size: 14px;
  color: var(--ink-700);
  font-weight: 600;
  margin-top: 6px;
}
.tqf-kpi-sub {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 3px;
}
.tqf-kpi-blue .tqf-kpi-num { color: var(--blue-700); }
.tqf-kpi-blue { border-color: var(--blue-200); }
.tqf-kpi-amber .tqf-kpi-num { color: #d97706; }
.tqf-kpi-amber { border-color: #fde68a; }
.tqf-kpi-green .tqf-kpi-num { color: #059669; }
.tqf-kpi-green { border-color: #a7f3d0; }
.tqf-kpi-purple .tqf-kpi-num { color: #7c3aed; }
.tqf-kpi-purple { border-color: #ddd6fe; }

.tqf-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.tqf-panel {
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px;
  border: 2px solid var(--blue-100);
  box-shadow: 0 6px 22px rgba(3,105,161,.08);
}
.tqf-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--blue-100);
}
.tqf-panel-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  font-size: 22px;
}
.tqf-panel h3 {
  margin: 0;
  font-family: 'Prompt', sans-serif;
  color: var(--blue-800);
  font-size: 20px;
  font-weight: 700;
}
.tqf-adm-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tqf-adm-list li {
  padding: 11px 14px 11px 40px;
  position: relative;
  color: var(--ink-700);
  font-size: 14.5px;
  line-height: 1.7;
  border-bottom: 1px dashed var(--blue-100);
}
.tqf-adm-list li::before {
  content: '✔';
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--blue-500);
  font-weight: 700;
}
.tqf-adm-list li:last-child { border-bottom: none; }
.tqf-fac-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tqf-fac-card {
  background: var(--blue-50);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--blue-100);
  text-align: center;
}
.tqf-fac-value {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--blue-700);
  line-height: 1;
}
.tqf-fac-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  margin-top: 4px;
}
.tqf-fac-sub {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .tqf-top-grid { grid-template-columns: repeat(2, 1fr); }
  .tqf-section-grid { grid-template-columns: 1fr; }
  .tqf-fac-list { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .tqf-top-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ACTIVITIES section
============================================================ */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.act-card {
  background: linear-gradient(180deg, #fff 0%, var(--blue-50) 100%);
  border-radius: 18px;
  padding: 24px 22px;
  border: 1px solid var(--blue-200);
  box-shadow: 0 6px 22px rgba(3,105,161,.08);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.act-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--blue-500), #14b8a6, #f59e0b);
}
.act-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 38px rgba(3,105,161,.18);
}
.act-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.act-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.act-head-text { flex: 1; min-width: 0; }
.act-year {
  font-size: 11.5px;
  color: var(--blue-600);
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.act-title {
  font-family: 'Prompt', sans-serif;
  color: var(--blue-800);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}
.act-summary {
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 10px 0;
}
.act-details {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px dashed var(--blue-200);
  padding-top: 10px;
}
.act-details li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-600);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 4px;
}
.act-details li::before {
  content: '•';
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--blue-500);
  font-weight: 700;
}

/* ============================================================
   COURSE TILE description preview
============================================================ */
.course-tile.has-desc { padding-bottom: 18px; }
.ct-desc {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--blue-200);
  color: var(--ink-600);
  font-size: 12.5px;
  line-height: 1.65;
  text-align: left;
}

/* Course modal English description */
.mc-desc-title-en {
  color: var(--blue-600);
  font-family: 'Prompt', sans-serif;
  margin-top: 18px;
}
.mc-desc-en {
  font-family: 'IBM Plex Sans Thai', 'Prompt', sans-serif;
  font-style: italic;
  color: var(--ink-600);
}

/* ============================================================
   FACULTY MODAL
============================================================ */
.modal-faculty {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mf-header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 2px dashed var(--blue-200);
}
.mf-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 30px;
  box-shadow: 0 6px 16px rgba(3,105,161,.3);
  flex-shrink: 0;
}
.mf-head-text { flex: 1; min-width: 0; }
.mf-name {
  margin: 0;
  font-family: 'Prompt', sans-serif;
  color: var(--blue-800);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.mf-rank {
  color: var(--ink-600);
  font-size: 13.5px;
  margin-top: 4px;
}
.mf-role {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}
.mf-role-resp { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.mf-role-curr { background: linear-gradient(135deg,#14b8a6,#0ea5e9); }
.mf-exp {
  background: var(--blue-50);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-700);
}
.mf-exp b { color: var(--blue-800); }
.mf-section { }
.mf-sub {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  color: var(--blue-700);
  font-size: 14px;
  margin-bottom: 8px;
}
.mf-edu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mf-edu li {
  padding: 8px 0 8px 22px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-700);
  border-bottom: 1px dashed var(--blue-100);
}
.mf-edu li::before {
  content: '🎓';
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 13px;
}
.mf-edu li:last-child { border-bottom: none; }

/* ============================================================
   PRACTICUM v2 — supervisor card pills, view toggle, school block
============================================================ */
.sup-pill-total { background: var(--blue-700); color: #fff; }
.sup-pill-school {
  background: #fde68a;
  color: #92400e;
}
.sup-pill-y4 {
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #fff;
}
.sup-pill-y3 {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}
.sup-pill-y2 {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
}

.student-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}
.student-list-header .subhead { margin-top: 0 !important; }

.view-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--ink-600);
  font-family: 'Prompt', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.view-btn.active {
  background: #fff;
  color: var(--blue-700);
  box-shadow: 0 2px 8px rgba(3,105,161,.15);
}
.view-btn:hover:not(.active) { background: rgba(255,255,255,.5); }

/* School block (by-school view) */
.sl-school-block {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1.5px solid var(--blue-100);
  box-shadow: 0 4px 18px rgba(3,105,161,.06);
}
.sl-school-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px dashed var(--blue-100);
}
.sl-school-icon {
  font-size: 28px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border-radius: 14px;
  flex-shrink: 0;
}
.sl-school-main { flex: 1; min-width: 0; }
.sl-school-name {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  color: var(--blue-800);
  font-size: 16px;
  line-height: 1.35;
}
.sl-school-meta {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 2px;
}
.sl-school-count {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--blue-600);
  line-height: 1;
  flex-shrink: 0;
}

/* Chip for level in student row */
.sl-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}
.sl-chip-y4 { background: linear-gradient(135deg,#0369a1,#0ea5e9); }
.sl-chip-y3 { background: linear-gradient(135deg,#059669,#10b981); }
.sl-chip-y2 { background: linear-gradient(135deg,#d97706,#f59e0b); }
.sl-chip-nl { background: var(--ink-400); }

@media (max-width: 700px) {
  .sl-school-head { flex-wrap: wrap; }
  .sl-school-count { font-size: 28px; }
  .student-list-header { flex-direction: column; align-items: stretch; }
  #view-seg { justify-content: center; }
}

/* ============================================================
   DISCIPLINE WHEEL — 8 radial discipline buttons around a core
============================================================ */
.discipline-wheel-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
  margin: 10px 0 42px 0;
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, var(--blue-50) 100%);
  border: 1.5px solid var(--blue-100);
  box-shadow: 0 12px 40px rgba(3,105,161,.08);
  overflow: hidden;
  position: relative;
}
.discipline-wheel-wrap::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(14,165,233,.15), transparent 60%);
  pointer-events: none;
}
.wheel-intro .wheel-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue-600), #6366f1);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.wheel-intro h3 {
  font-family: 'Prompt', sans-serif;
  font-size: 26px;
  color: var(--blue-900);
  line-height: 1.3;
  margin: 0 0 12px 0;
  font-weight: 700;
}
.wheel-intro p {
  color: var(--ink-600);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.wheel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.wheel-stats div {
  font-size: 13px;
  color: var(--ink-600);
}
.wheel-stats b {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--blue-700);
  line-height: 1;
}

/* actual wheel */
.discipline-wheel {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.disc-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-500) 60%, #14b8a6 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 20px 50px rgba(3,105,161,.35), inset 0 0 30px rgba(255,255,255,.15);
  z-index: 3;
  padding: 10px;
}
.disc-core-icon { font-size: 36px; line-height: 1; }
.disc-core-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
}
.disc-core-sub {
  font-size: 10px;
  opacity: .85;
  margin-top: 2px;
  letter-spacing: .3px;
}

/* rotating dotted circle behind the core */
.disc-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 72%;
  aspect-ratio: 1/1;
  border: 2px dashed rgba(14,165,233,.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: disc-spin 60s linear infinite;
}
@keyframes disc-spin { from {transform: translate(-50%,-50%) rotate(0);} to {transform: translate(-50%,-50%) rotate(360deg);} }

/* individual discipline petal */
.disc-petal {
  position: absolute;
  top: 50%; left: 50%;
  width: 108px; height: 108px;
  margin: -54px 0 0 -54px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.15);
  transition: transform .3s cubic-bezier(.4,.0,.2,1), box-shadow .3s ease;
  z-index: 2;
  border: 3px solid rgba(255,255,255,.9);
}
.disc-petal:hover {
  transform: scale(1.12);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
  z-index: 4;
}
.disc-petal .dp-icon { font-size: 24px; line-height: 1; }
.disc-petal .dp-name {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.25;
}
.disc-petal .dp-count {
  position: absolute;
  top: -6px; right: -6px;
  background: #fff;
  color: var(--ink-900);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

/* discipline-specific gradients (8 colors) */
.dp-religion   { background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%); }
.dp-polisci    { background: linear-gradient(135deg, #dc2626 0%, #f59e0b 100%); }
.dp-law        { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); }
.dp-socio      { background: linear-gradient(135deg, #059669 0%, #14b8a6 100%); }
.dp-anthro     { background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%); }
.dp-econ       { background: linear-gradient(135deg, #0f766e 0%, #06b6d4 100%); }
.dp-history    { background: linear-gradient(135deg, #78350f 0%, #b45309 100%); }
.dp-geo        { background: linear-gradient(135deg, #047857 0%, #65a30d 100%); }

/* Course meta row */
.course-meta-row {
  margin: 18px 0 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.course-count-label {
  color: var(--ink-600);
  font-size: 14px;
}
.course-count-label b {
  color: var(--blue-700);
  font-family: 'Prompt', sans-serif;
  font-size: 18px;
}

@media (max-width: 900px) {
  .discipline-wheel-wrap {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 28px;
  }
  .discipline-wheel { max-width: 400px; }
  .disc-petal { width: 90px; height: 90px; margin: -45px 0 0 -45px; }
  .disc-petal .dp-icon { font-size: 20px; }
  .disc-petal .dp-name { font-size: 11px; }
  .wheel-intro h3 { font-size: 22px; }
}
@media (max-width: 500px) {
  .discipline-wheel { max-width: 320px; }
  .disc-petal { width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 4px; }
  .disc-petal .dp-icon { font-size: 16px; }
  .disc-petal .dp-name { font-size: 9.5px; }
  .disc-core-icon { font-size: 26px; }
  .disc-core-title { font-size: 11px; }
  .disc-core-sub { font-size: 8.5px; }
}

/* ============================================================
   DISCIPLINE MODAL
============================================================ */
.modal-discipline { padding: 0; margin: -32px; }
.modal-card .modal-discipline { margin: -28px; }
.md-hero {
  padding: 34px 28px 28px;
  color: #fff;
  text-align: center;
  border-radius: 22px 22px 0 0;
  position: relative;
  overflow: hidden;
}
.md-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%);
  pointer-events: none;
}
.md-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}
.md-name {
  font-family: 'Prompt', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}
.md-count {
  margin-top: 6px;
  font-size: 14px;
  opacity: .92;
}
.md-body {
  padding: 20px 24px 28px;
  max-height: 60vh;
  overflow-y: auto;
}
.md-note {
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid var(--blue-500);
}
.dm-course-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dm-course {
  background: #fff;
  border: 1.5px solid var(--blue-100);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.dm-course:hover {
  border-color: var(--blue-500);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(3,105,161,.12);
  background: var(--blue-50);
}
.dm-course-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.dm-course-code {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  color: var(--blue-700);
  font-size: 14px;
}
.dm-course-credits {
  font-size: 12px;
  color: var(--ink-500);
  background: var(--blue-50);
  padding: 2px 8px;
  border-radius: 999px;
}
.dm-course-thai {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  color: var(--ink-800);
  font-size: 13.5px;
  line-height: 1.4;
}
.dm-course-eng {
  color: var(--ink-500);
  font-size: 11.5px;
  margin-top: 3px;
  font-style: italic;
}

@media (max-width: 600px) {
  .dm-course-list { grid-template-columns: 1fr; }
  .md-name { font-size: 22px; }
  .md-icon { font-size: 40px; }
}

/* ============================================================
   PRIVACY STYLES (practicum)
============================================================ */
.ms-private {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 10px;
  padding: 10px 14px !important;
  border-left: 3px solid #f59e0b;
}
.ms-private-note {
  font-size: 12.5px !important;
  color: #92400e !important;
  font-style: italic;
  font-weight: 500 !important;
}
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 100%);
  border: 1.5px dashed #0ea5e9;
  padding: 14px 20px;
  border-radius: 14px;
  margin: 20px 0 16px 0;
  color: var(--ink-700);
}
.privacy-banner-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.privacy-banner-text {
  font-size: 13.5px;
  line-height: 1.6;
}
.privacy-banner-text b { color: var(--blue-800); }

/* ============================================================
   FACULTY MODAL EXTERNAL LINKS
============================================================ */
.mf-links-section {
  background: linear-gradient(135deg, var(--blue-50) 0%, #ecfeff 100%);
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px dashed var(--blue-200);
}
.mf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.mf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,.1);
}
.mf-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.mf-link-bsru { background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); }
.mf-link-bsrunet { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
.mf-link-fb { background: linear-gradient(135deg, #1877f2, #0a66c2); }

/* ============================================================
   FOOTER SOCIAL
============================================================ */
.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
  transition: all .2s ease;
}
.social-btn:hover {
  background: rgba(255,255,255,.15);
  transform: translateY(-2px);
}
.social-icon { font-size: 20px; }
.social-txt {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.social-txt small {
  display: block;
  font-size: 10.5px;
  opacity: .75;
  font-weight: 400;
}
.social-fb:hover { background: linear-gradient(135deg, rgba(24,119,242,.25), rgba(10,102,194,.25)); }
.social-web:hover { background: linear-gradient(135deg, rgba(14,165,233,.25), rgba(3,105,161,.25)); }

/* Faculty card external link hint */
.faculty-card .fc-more::after {
  content: ' (+ ลิงก์ภายนอก)';
  font-size: 10.5px;
  opacity: .7;
}

/* ============================================================
   ACTIVITIES v2 — hero strips + footer CTA
============================================================ */
.act-card {
  padding: 0 !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}
.act-card::before { display: none !important; }
.act-hero {
  height: 130px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}
.act-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.25), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.15), transparent 50%);
}
.act-hero-icon {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
  z-index: 2;
}
.act-hero-year {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.3);
}
.act-hero-decor {
  position: absolute;
  bottom: -20px; left: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.act-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.act-body .act-title { margin-top: 0; }
.act-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--blue-200);
}
.act-fb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg,#1877f2,#0a66c2);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}
.act-fb-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(24,119,242,.35);
}
