:root {
  --blue: #1288f8;
  --blue-dark: #075ec8;
  --gold: #f5c542;
  --dark: #0b2347;
  --white: #ffffff;
  --page-bg: #eef7ff;
  --footer-h: 78px;
  --nav-safe: 104px;
}

/* =========================================================
   RESET / BASE
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans Thai", sans-serif;
  color: var(--dark);
  background: var(--page-bg);
}

img {
  max-width: 100%;
  display: block;
}

a,
button {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* หน้า presentation/index ให้เต็มจอ */
body.index-page {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

/* =========================================================
   NAVBAR
========================================================= */

.site-navbar {
  position: fixed;
  z-index: 80;
  top: 18px;
  left: 50%;
  width: min(980px, calc(100% - 32px));
  min-height: 68px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 999px;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 45px rgba(7, 94, 200, 0.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--dark);
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  box-shadow: 0 10px 26px rgba(7, 94, 200, 0.18);
}

/* ใช้กับ <span class="brand-mark teacher-icon"><img ...></span> */
.brand-mark.teacher-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #fff3c4 45%, #f5c542);
  border: 1px solid rgba(245, 197, 66, 0.75);
  box-shadow:
    0 12px 28px rgba(7, 94, 200, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.brand-mark.teacher-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 0.98rem;
  white-space: nowrap;
}

.brand-text small {
  font-size: 0.78rem;
  color: #60718c;
  font-weight: 700;
  white-space: nowrap;
}

.nav-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 10px 24px rgba(7, 94, 200, 0.22);
}

.nav-menu a:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--blue-dark);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #ffffff;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================================
   PRESENTATION / SLIDES
========================================================= */

.presentation {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  perspective: 1400px;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: var(--nav-safe) clamp(36px, 6vw, 110px) 26px;
  opacity: 0;
  pointer-events: none;
  filter: blur(10px);
  overflow: hidden;
  transform: scale(0.96) translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.75s cubic-bezier(0.2, 0.9, 0.2, 1),
    filter 0.55s ease;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
  transform: scale(1) translateY(0);
}

.slide.preparing {
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.05) translateY(28px) rotateX(4deg);
}

.slide.leaving {
  opacity: 0;
  filter: blur(14px);
  transform: scale(0.92) translateY(-28px) rotateX(-6deg);
}

.slide-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 197, 66, 0.32), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(18, 136, 248, 0.24), transparent 35%),
    linear-gradient(135deg, #ffffff, #e7f4ff);
  animation: bgMove 8s ease-in-out infinite alternate;
}

.slide::after {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg,
      transparent 35%,
      rgba(255, 255, 255, 0.32) 50%,
      transparent 65%);
  transform: translateX(-60%);
  animation: lightSweep 7s ease-in-out infinite;
}

/* =========================================================
   HERO
========================================================= */

.slide-hero {
  display: block;
}

.hero-content {
  position: relative;
  z-index: 6;
  width: min(1120px, 72vw);
  max-width: 100%;
}

.hero-content::after {
  content: "";
  position: absolute;
  left: -80px;
  top: -60px;
  z-index: -1;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 66, 0.22), transparent 70%);
  filter: blur(10px);
  animation: heroGlow 5s ease-in-out infinite alternate;
}

.badge {
  display: inline-block;
  margin-bottom: clamp(16px, 2vw, 28px);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fff2ad);
  box-shadow: 0 12px 28px rgba(245, 197, 66, 0.18);
}

h1 {
  margin: 24px 0;
  font-family: "Chonburi", serif;
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -2px;
}

h1 span,
.section-title span {
  color: var(--blue-dark);
}

h1 span {
  font-size: 0.82em;
}

.dynamic-title {
  position: relative;
  display: inline-block;
  color: transparent;
  background: linear-gradient(100deg,
      #071f4b 10%,
      #0b2347 34%,
      #126bd6 50%,
      #0b2347 66%,
      #071f4b 90%);
  background-size: 260% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleLight 5.5s ease-in-out infinite;
}

.slide-hero .dynamic-title {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 clamp(18px, 2vw, 30px);
  font-size: clamp(3rem, 4.35vw, 5.25rem);
  line-height: 1.12;
  letter-spacing: -1.35px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.slide-hero .dynamic-title .title-line {
  display: block;
  white-space: normal;
}

.slide-hero .dynamic-title .title-line-accent {
  color: transparent;
}

.hero-content p {
  position: relative;
  z-index: 3;
  max-width: 940px;
  margin: 0;
  font-size: clamp(1.06rem, 1.18vw, 1.32rem);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
}

.btn-main,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.btn-main {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 16px 34px rgba(7, 94, 200, 0.22);
}

.btn-outline {
  color: var(--blue-dark);
  background: #ffffff;
  border: 2px solid var(--blue);
}

.btn-main:hover,
.btn-outline:hover {
  transform: translateY(-4px);
}

.hero-layer {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: min(54vw, 900px);
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.hero-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to left,
      rgba(231, 244, 255, 0) 0%,
      rgba(231, 244, 255, 0.03) 35%,
      rgba(231, 244, 255, 0.18) 70%,
      rgba(231, 244, 255, 0.48) 100%);
}

.teacher-light-layer {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.9;
}

.teacher-light-layer.layer-one {
  right: 2%;
  bottom: 8%;
  width: min(430px, 30vw);
  height: min(430px, 30vw);
  background: radial-gradient(circle,
      rgba(245, 197, 66, 0.3),
      rgba(245, 197, 66, 0.08) 50%,
      transparent 74%);
  animation: heroGlow 5s ease-in-out infinite alternate;
}

.teacher-light-layer.layer-two {
  right: -6%;
  top: 8%;
  width: min(360px, 24vw);
  height: min(360px, 24vw);
  background: radial-gradient(circle,
      rgba(18, 136, 248, 0.22),
      rgba(18, 136, 248, 0.06) 52%,
      transparent 74%);
  animation: floatBubble 8s ease-in-out infinite alternate;
}

.teacher-photo-layer,
.teacher-photo-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 42px rgba(7, 35, 71, 0.18));
}

.teacher-photo-layer.is-missing {
  display: none;
}

.teacher-photo-fallback {
  display: none;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(4.2rem, 8vw, 8rem);
  font-weight: 900;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(135deg, rgba(18, 136, 248, 0.48), rgba(245, 197, 66, 0.36));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.teacher-photo-fallback.show {
  display: grid;
}

.teacher-text-layer {
  position: absolute;
  right: clamp(18px, 3vw, 48px);
  bottom: 26px;
  z-index: 4;
  width: min(620px, calc(100% - 36px));
  max-height: calc(100% - 150px);
  padding: clamp(20px, 2.1vw, 32px);
  border: 0;
  border-radius: 34px;
  color: var(--dark);
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 197, 66, 0.24), transparent 36%),
    radial-gradient(circle at 88% 92%, rgba(18, 136, 248, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.18));
  box-shadow:
    0 24px 64px rgba(7, 35, 71, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
}

.teacher-text-layer::before {
  content: "";
  position: absolute;
  inset: -46%;
  z-index: -1;
  background: linear-gradient(115deg,
      transparent 42%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 58%);
  transform: translateX(-62%) rotate(8deg);
  animation: cardShine 7s ease-in-out infinite;
}

.teacher-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  font-weight: 900;
  color: var(--blue-dark);
  letter-spacing: 0.02em;
}

.teacher-text-layer h2 {
  margin: 0 0 9px;
  font-family: "Chonburi", "Noto Sans Thai", sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  line-height: 1.2;
  color: #0b2347;
}

.teacher-text-layer p {
  margin: 0 0 8px;
  max-width: none;
  font-size: clamp(1rem, 1.05vw, 1.18rem);
  font-weight: 700;
  line-height: 1.65;
  color: rgba(11, 35, 71, 0.82);
}

.teacher-text-layer strong {
  display: block;
  font-size: clamp(1.05rem, 1.2vw, 1.3rem);
  color: var(--blue-dark);
}

.hero-card,
.teacher-avatar {
  display: none;
}

/* =========================================================
   PROFILE PAGE
========================================================= */

.profile-page {
  padding-top: var(--nav-safe);
  padding-bottom: 26px;
}

.profile-layout {
  position: relative;
  z-index: 6;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(24px, 3.5vw, 54px);
  align-items: stretch;
}

.profile-visual {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  isolation: isolate;
}

.profile-light-layer {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(5px);
  opacity: 0.9;
}

.profile-light-layer.layer-one {
  right: 4%;
  bottom: 8%;
  width: min(430px, 30vw);
  height: min(430px, 30vw);
  background: radial-gradient(circle,
      rgba(245, 197, 66, 0.32),
      rgba(245, 197, 66, 0.08) 50%,
      transparent 74%);
  animation: heroGlow 5s ease-in-out infinite alternate;
}

.profile-light-layer.layer-two {
  left: -10%;
  top: 10%;
  width: min(360px, 25vw);
  height: min(360px, 25vw);
  background: radial-gradient(circle,
      rgba(18, 136, 248, 0.24),
      rgba(18, 136, 248, 0.07) 52%,
      transparent 74%);
  animation: floatBubble 8s ease-in-out infinite alternate;
}

.profile-photo,
.profile-photo-fallback {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(100%, 520px);
  height: 100%;
  max-height: 100%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  border: 0;
  outline: 0;
  background: transparent;
  filter: drop-shadow(0 30px 54px rgba(7, 35, 71, 0.24));
}

.profile-photo.is-missing {
  display: none;
}

.profile-photo-fallback {
  display: none;
  place-items: center;
  aspect-ratio: 1 / 1;
  height: auto;
  bottom: 18%;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Chonburi", "Noto Sans Thai", serif;
  font-size: clamp(4.8rem, 8vw, 8rem);
  font-weight: 900;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.45), transparent 28%),
    linear-gradient(135deg, rgba(18, 136, 248, 0.5), rgba(245, 197, 66, 0.4));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-photo-fallback.show {
  display: grid;
}

.profile-name-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 5;
  width: min(100%, 570px);
  transform: translateX(-50%);
  padding: clamp(18px, 1.7vw, 28px);
  border-radius: 34px;
  color: var(--dark);
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 197, 66, 0.28), transparent 36%),
    radial-gradient(circle at 88% 92%, rgba(18, 136, 248, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.18));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 28px 72px rgba(7, 35, 71, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  overflow: hidden;
}

.profile-name-card::before {
  content: "";
  position: absolute;
  inset: -46%;
  z-index: -1;
  background: linear-gradient(115deg,
      transparent 42%,
      rgba(255, 255, 255, 0.34) 50%,
      transparent 58%);
  transform: translateX(-62%) rotate(8deg);
  animation: cardShine 7s ease-in-out infinite;
}

.profile-label,
.profile-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-weight: 900;
}

.profile-label {
  margin-bottom: 10px;
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  color: var(--blue-dark);
  letter-spacing: 0.02em;
}

.profile-kicker {
  padding: 10px 20px;
  border-radius: 999px;
  color: #0b2347;
  background: linear-gradient(135deg, var(--gold), #fff2ad);
  box-shadow: 0 12px 28px rgba(245, 197, 66, 0.18);
}

.profile-name-card h2 {
  margin: 0 0 9px;
  font-family: "Chonburi", "Noto Sans Thai", serif;
  font-size: clamp(1.75rem, 2.25vw, 2.8rem);
  line-height: 1.2;
  color: #0b2347;
}

.profile-name-card p {
  margin: 0 0 7px;
  font-size: clamp(0.98rem, 1.06vw, 1.16rem);
  font-weight: 700;
  line-height: 1.6;
  color: rgba(11, 35, 71, 0.82);
}

.profile-name-card strong {
  display: block;
  font-size: clamp(1rem, 1.12vw, 1.24rem);
  color: var(--blue-dark);
}

.profile-content {
  position: relative;
  z-index: 7;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.profile-title {
  display: block;
  margin: 16px 0 10px;
  font-family: "Chonburi", "Noto Sans Thai", serif;
  font-size: clamp(2.35rem, 3.45vw, 4.45rem);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: transparent;
  background: linear-gradient(100deg,
      #071f4b 10%,
      #0b2347 34%,
      #126bd6 50%,
      #0b2347 66%,
      #071f4b 90%);
  background-size: 260% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleLight 5.5s ease-in-out infinite;
}

.profile-desc {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(0.96rem, 1vw, 1.1rem);
  line-height: 1.72;
  color: rgba(11, 35, 71, 0.82);
  font-weight: 600;
}

.profile-decoration {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.profile-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.7;
  animation: floatBubble 9s ease-in-out infinite alternate;
}

.profile-orb.one {
  right: 5%;
  top: 16%;
  width: 130px;
  height: 130px;
  background: linear-gradient(135deg, rgba(18, 136, 248, 0.2), rgba(245, 197, 66, 0.24));
}

.profile-orb.two {
  left: 8%;
  bottom: 8%;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(18, 136, 248, 0.12));
  animation-delay: 2.2s;
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-subgrid {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  gap: 12px;
  margin-top: 12px;
}

.profile-list,
.profile-subgrid,
.profile-item,
.profile-mini {
  min-width: 0;
  max-width: 100%;
}

.profile-item,
.profile-mini {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.profile-item {
  padding: 12px 14px;
  border-radius: 20px;
}

.profile-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 0.86rem;
}

.profile-item strong {
  display: block;
  color: #0b2347;
  font-weight: 800;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.profile-mini {
  padding: 14px;
  border-radius: 24px;
}

.profile-mini h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--blue-dark);
}

.timeline,
.skill-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 3px;
  padding-left: 14px;
  border-left: 4px solid rgba(18, 136, 248, 0.3);
}

.timeline strong {
  color: #0b2347;
  font-weight: 900;
}

.timeline span,
.skill-list li {
  color: rgba(11, 35, 71, 0.78);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.skill-list li {
  position: relative;
  padding-left: 22px;
}

.skill-list li::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
}

/* =========================================================
   SECTION / SHORTCUT
========================================================= */

.section-title {
  position: relative;
  z-index: 6;
  text-align: center;
}

.section-title h2 {
  margin: 14px 0 36px;
  font-family: "Chonburi", serif;
  font-size: clamp(2rem, 4vw, 4rem);
}

.shortcut-grid,
.profile-info-grid {
  position: relative;
  z-index: 6;
  max-width: 1200px;
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.shortcut {
  min-height: 140px;
  padding: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--dark);
  text-decoration: none;
  font-weight: 900;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 20px 50px rgba(7, 94, 200, 0.13);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.shortcut:hover {
  color: var(--blue-dark);
  box-shadow: 0 28px 72px rgba(7, 94, 200, 0.2);
  transform: translateY(-4px);
}

.profile-info-grid .shortcut {
  align-content: center;
  gap: 8px;
  min-height: 132px;
}

.profile-info-grid .shortcut span {
  display: block;
  color: var(--blue-dark);
  font-size: 0.94rem;
  font-weight: 900;
}

.profile-info-grid .shortcut strong {
  display: block;
  color: #0b2347;
  font-size: clamp(1rem, 1.15vw, 1.22rem);
  line-height: 1.55;
  font-weight: 900;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.profile-note {
  position: relative;
  z-index: 6;
  max-width: 960px;
  margin: 26px auto 0;
  padding: 18px 24px;
  border-radius: 28px;
  text-align: center;
  color: rgba(11, 35, 71, 0.82);
  font-weight: 700;
  line-height: 1.75;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: 0 20px 50px rgba(7, 94, 200, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* =========================================================
   FOOTER CONTROLS
========================================================= */

.slide-controls {
  position: relative;
  z-index: 70;
  min-height: var(--footer-h);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: transparent;
}

.slide-controls::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top,
      rgba(238, 247, 255, 0.94),
      rgba(238, 247, 255, 0.52),
      transparent);
  pointer-events: none;
}

.slide-controls>span,
.slide-controls>button,
.slide-controls>a {
  position: relative;
  z-index: 1;
}

.slide-controls>span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 20px 50px rgba(7, 94, 200, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-weight: 900;
  color: rgba(11, 35, 71, 0.82);
}

.slide-controls button,
.slide-controls a.btn-main,
.slide-controls a.btn-outline {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.45rem;
  line-height: 1;
}

.slide-controls button {
  border: 0;
  color: #ffffff;
  background: var(--blue-dark);
  cursor: pointer;
}

/* =========================================================
   EFFECTS
========================================================= */

.tilt-card {
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition:
    transform 0.18s ease,
    box-shadow 0.25s ease;
  will-change: transform;
}

.tilt-card.is-tilting {
  transition:
    transform 0.04s linear,
    box-shadow 0.25s ease;
}

.thai-floating-letters,
.bg-animation,
.ambient-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.thai-floating-letters span {
  position: absolute;
  font-family: "Chonburi", serif;
  font-weight: 900;
  color: var(--blue-dark);
  text-shadow: 0 10px 30px rgba(7, 94, 200, 0.14);
  user-select: none;
  filter: blur(0.4px);
  animation: thaiFloat ease-in-out infinite alternate;
}

.thai-floating-letters span:nth-child(3n) {
  color: var(--gold);
}

.thai-floating-letters span:nth-child(4n) {
  color: #ffffff;
}

.ambient-particles i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.8),
    0 0 24px rgba(245, 197, 66, 0.32);
  animation: particleFloat ease-in-out infinite alternate;
}

.bubble,
.ring,
.star {
  position: absolute;
  opacity: 0.55;
}

.bubble {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(18, 136, 248, 0.25), rgba(245, 197, 66, 0.35));
  animation: floatBubble 9s ease-in-out infinite alternate;
}

.b1 {
  left: 8%;
  top: 18%;
}

.b2 {
  right: 10%;
  top: 20%;
  width: 90px;
  height: 90px;
  animation-delay: 1.5s;
}

.b3 {
  left: 55%;
  bottom: 12%;
  width: 150px;
  height: 150px;
  animation-delay: 2.5s;
}

.star {
  color: var(--gold);
  font-size: 42px;
  text-shadow: 0 8px 22px rgba(245, 197, 66, 0.35);
  animation: twinkle 2.8s ease-in-out infinite alternate;
}

.s1 {
  left: 18%;
  bottom: 18%;
}

.s2 {
  right: 24%;
  bottom: 28%;
  font-size: 34px;
  animation-delay: 1.2s;
}

.ring {
  width: 180px;
  height: 180px;
  border: 18px solid rgba(18, 136, 248, 0.13);
  border-radius: 50%;
  animation: rotateRing 14s linear infinite;
}

.r1 {
  right: -50px;
  bottom: 80px;
}

.r2 {
  left: -70px;
  bottom: -40px;
  width: 240px;
  height: 240px;
  border-color: rgba(245, 197, 66, 0.18);
  animation-duration: 18s;
}

.cursor-glow {
  position: fixed;
  z-index: 9998;
  left: 0;
  top: 0;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(245, 197, 66, 0.26), transparent 55%),
    radial-gradient(circle, rgba(18, 136, 248, 0.18), transparent 70%);
  mix-blend-mode: screen;
  filter: blur(4px);
  transition: opacity 0.25s ease;
}

.cursor-glow.visible {
  opacity: 1;
}

/* =========================================================
   PAGE TRANSITION
========================================================= */

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(245, 197, 66, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(7, 35, 71, 0.96), rgba(7, 94, 200, 0.94));
  transition: opacity 0.18s ease;
}

.page-transition.show {
  opacity: 1;
  pointer-events: auto;
}

.transition-panel {
  position: absolute;
  inset: 0;
  transform: translateX(-110%) skewX(-12deg);
}

.panel-a {
  background: rgba(255, 255, 255, 0.18);
}

.panel-b {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.3), rgba(18, 136, 248, 0.18));
}

.transition-orb {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  box-shadow:
    0 0 0 20px rgba(255, 255, 255, 0.08),
    0 0 80px rgba(245, 197, 66, 0.45);
  transform: scale(0.2);
}

.transition-text {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(18px);
}

.page-transition.show .panel-a {
  animation: panelSweep 0.72s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.page-transition.show .panel-b {
  animation: panelSweep 0.72s cubic-bezier(0.2, 0.9, 0.2, 1) 0.08s forwards;
}

.page-transition.show .transition-orb {
  animation: orbExpand 0.75s ease forwards;
}

.page-transition.show .transition-text {
  animation: transitionText 0.55s ease 0.12s forwards;
}

/* =========================================================
   ANIMATION HELPERS
========================================================= */

.animate {
  opacity: 0;
}

.active .fade-up {
  animation: fadeUp 0.8s ease forwards;
}

.active .zoom-in {
  animation: zoomIn 0.7s ease forwards;
}

.active .slide-right {
  animation: slideRight 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.15s !important;
}

.delay-2 {
  animation-delay: 0.3s !important;
}

.delay-3 {
  animation-delay: 0.45s !important;
}

.delay-4 {
  animation-delay: 0.6s !important;
}

.delay-5 {
  animation-delay: 0.75s !important;
}

.delay-6 {
  animation-delay: 0.9s !important;
}

.delay-7 {
  animation-delay: 1.05s !important;
}

.delay-8 {
  animation-delay: 1.2s !important;
}

/* =========================================================
   KEYFRAMES
========================================================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(45px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.75);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bgMove {
  from {
    filter: hue-rotate(0deg);
    transform: scale(1);
  }

  to {
    filter: hue-rotate(8deg);
    transform: scale(1.03);
  }
}

@keyframes thaiFloat {
  from {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(0.92);
  }

  to {
    transform: translate3d(34px, -48px, 0) rotate(12deg) scale(1.08);
  }
}

@keyframes particleFloat {
  from {
    transform: translate3d(0, 0, 0) scale(0.85);
  }

  to {
    transform: translate3d(20px, -42px, 0) scale(1.25);
  }
}

@keyframes floatBubble {
  from {
    transform: translateY(0) translateX(0) scale(1);
  }

  to {
    transform: translateY(-35px) translateX(28px) scale(1.08);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.25;
    transform: scale(0.8) rotate(0deg);
  }

  to {
    opacity: 0.9;
    transform: scale(1.15) rotate(12deg);
  }
}

@keyframes rotateRing {
  from {
    transform: rotate(0deg) scale(1);
  }

  to {
    transform: rotate(360deg) scale(1.08);
  }
}

@keyframes lightSweep {

  0%,
  45% {
    transform: translateX(-65%) rotate(8deg);
  }

  100% {
    transform: translateX(65%) rotate(8deg);
  }
}

@keyframes titleLight {

  0%,
  35% {
    background-position: 0% center;
  }

  70%,
  100% {
    background-position: 100% center;
  }
}

@keyframes cardShine {

  0%,
  45% {
    transform: translateX(-65%) rotate(8deg);
  }

  100% {
    transform: translateX(65%) rotate(8deg);
  }
}

@keyframes cardFloat {
  from {
    translate: 0 0;
  }

  to {
    translate: 0 -10px;
  }
}

@keyframes avatarFloat {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-10px);
  }
}

@keyframes heroGlow {
  from {
    transform: translate3d(0, 0, 0) scale(0.95);
    opacity: 0.55;
  }

  to {
    transform: translate3d(40px, 20px, 0) scale(1.08);
    opacity: 0.9;
  }
}

@keyframes orbExpand {
  from {
    transform: scale(0.2);
    opacity: 0.8;
  }

  to {
    transform: scale(24);
    opacity: 1;
  }
}

@keyframes transitionText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelSweep {
  from {
    transform: translateX(-110%) skewX(-12deg);
  }

  to {
    transform: translateX(110%) skewX(-12deg);
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1366px) {
  :root {
    --nav-safe: 100px;
    --footer-h: 74px;
  }

  .hero-content {
    width: min(1040px, 72vw);
  }

  .slide-hero .dynamic-title {
    font-size: clamp(2.7rem, 4.05vw, 4.75rem);
  }

  .hero-layer {
    width: min(56vw, 820px);
  }

  .profile-layout {
    grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
    gap: 34px;
  }

  .profile-title {
    font-size: clamp(2.25rem, 3.35vw, 4.1rem);
  }
}

@media (max-width: 1180px) {
  body.index-page {
    height: auto;
    min-height: 100vh;
    display: block;
    overflow: auto;
  }

  .presentation {
    height: auto;
    overflow: visible;
  }

  .slide,
  .slide-hero {
    position: relative;
    height: auto;
    min-height: 100vh;
    padding: 112px clamp(22px, 5vw, 48px) 86px;
    opacity: 1;
    pointer-events: auto;
    filter: none;
    overflow: visible;
    transform: none;
  }

  .slide.preparing,
  .slide.leaving {
    filter: none;
    transform: none;
  }

  .profile-layout {
    height: auto;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .profile-visual {
    order: 2;
    height: 620px;
  }

  .profile-content {
    order: 1;
  }

  .profile-photo,
  .profile-photo-fallback {
    width: min(520px, 86vw);
    height: 100%;
    max-height: 100%;
  }

  .profile-name-card {
    width: min(560px, 92vw);
  }

  .slide-controls {
    position: sticky;
    bottom: 0;
  }
}

@media (max-width: 980px) {
  .site-navbar {
    border-radius: 28px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    max-width: calc(100% - 60px);
  }

  .brand-text strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu a {
    text-align: center;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .slide-hero .dynamic-title {
    font-size: clamp(2.35rem, 7vw, 4.4rem);
    line-height: 1.16;
    letter-spacing: -1px;
    text-wrap: balance;
  }

  .hero-layer {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: min(500px, 72vh);
    min-height: min(500px, 72vh);
    max-height: 72vh;
    margin-top: 20px;
    border-radius: 28px;
  }

  .teacher-photo-layer,
  .teacher-photo-fallback {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
  }

  .hero-layer::after {
    background: linear-gradient(to top,
        rgba(231, 244, 255, 0.08) 0%,
        rgba(231, 244, 255, 0.16) 30%,
        rgba(231, 244, 255, 0.42) 68%,
        rgba(231, 244, 255, 0.7) 100%);
  }

  .teacher-text-layer {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: none;
    border-radius: 28px;
  }

  .profile-title {
    font-size: clamp(2.35rem, 7vw, 4.4rem);
    line-height: 1.16;
  }

  .profile-desc {
    max-width: 100%;
  }

  .profile-list,
  .profile-subgrid {
    width: 100%;
  }
}

@media (max-width: 900px) {

  .shortcut-grid,
  .profile-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .slide-controls,
  .cursor-glow {
    display: none;
  }
}

@media (max-width: 620px) {
  .site-navbar {
    top: 12px;
    width: min(100% - 20px, 980px);
    padding: 9px 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark.teacher-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    padding: 6px;
  }

  .brand-text strong {
    font-size: 0.9rem;
  }

  .slide,
  .slide-hero {
    padding-top: 104px;
    padding-bottom: 82px;
  }

  .slide-hero .dynamic-title {
    font-size: clamp(2.1rem, 10vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -1px;
    text-wrap: pretty;
  }

  .hero-content p {
    font-size: 1rem;
    line-height: 1.82;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions a {
    width: 100%;
    text-align: center;
  }

  .hero-layer {
    height: min(430px, 68vh);
    min-height: min(430px, 68vh);
    max-height: 68vh;
  }

  .teacher-light-layer.layer-one {
    width: 280px;
    height: 280px;
  }

  .teacher-light-layer.layer-two {
    width: 220px;
    height: 220px;
  }

  .teacher-text-layer {
    padding: 20px;
  }

  .teacher-text-layer h2 {
    font-size: clamp(1.45rem, 7vw, 2.05rem);
  }

  .profile-visual {
    height: 570px;
  }

  .profile-photo,
  .profile-photo-fallback {
    width: min(390px, 92vw);
  }

  .profile-name-card {
    width: 100%;
    padding: 18px;
    border-radius: 28px;
  }

  .profile-name-card h2 {
    font-size: clamp(1.48rem, 7vw, 2.05rem);
  }

  .profile-list,
  .profile-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {

  .shortcut-grid,
  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .brand-text small {
    display: none;
  }

  h1 {
    letter-spacing: -1px;
  }
}