:root {
  --profile-cyan: #06b6d4;
  --profile-cyan-dark: #0e7490;
  --profile-cyan-light: #cffafe;
  --profile-slate-50: #f8fafc;
  --profile-slate-100: #f1f5f9;
  --profile-slate-200: #e2e8f0;
  --profile-slate-400: #94a3b8;
  --profile-slate-500: #64748b;
  --profile-slate-700: #334155;
  --profile-slate-800: #1e293b;
  --profile-slate-900: #0f172a;
}

html { scroll-behavior: smooth; }
body { background: var(--profile-slate-100); color: var(--profile-slate-700); font-family: "Sarabun", sans-serif; min-height: 100vh; }
h1, h2, h3, h4 { font-family: "Prompt", sans-serif; }
a { color: var(--profile-cyan-dark); }
a:hover { color: #155e75; }

.profile-topbar { background: #fff; border-bottom: 1px solid var(--profile-slate-200); box-shadow: 0 2px 8px rgba(15, 23, 42, .05); }
.profile-topbar-inner { align-items: center; display: flex; min-height: 64px; }
.profile-brand { align-items: center; display: flex; gap: 12px; }
.profile-brand-icon { align-items: center; background: #0891b2; border-radius: 10px; box-shadow: 0 7px 18px rgba(8, 145, 178, .22); color: #fff; display: flex; height: 40px; justify-content: center; width: 40px; }
.profile-brand small, .profile-brand strong { display: block; }
.profile-brand small { color: #0891b2; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.profile-brand strong { color: var(--profile-slate-800); font-size: 14px; }
.profile-main { padding-bottom: 36px; padding-top: 32px; }

.profile-hero { background: linear-gradient(110deg, #06b6d4, #00bcd4 54%, #0891b2); border-radius: 24px; box-shadow: 0 18px 45px rgba(6, 182, 212, .17); color: #fff; margin-bottom: 32px; overflow: hidden; position: relative; }
.profile-hero-pattern { background-image: radial-gradient(rgba(255,255,255,.28) 1.5px, transparent 1.5px); background-size: 16px 16px; inset: 0; opacity: .5; pointer-events: none; position: absolute; }
.profile-hero-content { align-items: center; display: grid; gap: 28px; grid-template-columns: auto minmax(0, 1fr) minmax(260px, auto); padding: 38px 40px; position: relative; z-index: 1; }
.profile-photo-wrap { align-items: center; background: rgba(255,255,255,.94); border: 4px solid rgba(255,255,255,.3); border-radius: 18px; box-shadow: 0 12px 28px rgba(14, 116, 144, .3); display: flex; height: 176px; justify-content: center; overflow: hidden; width: 144px; }
.profile-photo { height: 100%; object-fit: cover; width: 100%; }
.profile-photo-placeholder { align-items: center; color: var(--profile-slate-400); display: flex; font-size: 64px; height: 100%; justify-content: center; width: 100%; }
.profile-badge { align-items: center; background: rgba(255,255,255,.18); border-radius: 999px; display: inline-flex; font-size: 12px; font-weight: 600; gap: 8px; letter-spacing: .04em; margin-bottom: 12px; padding: 5px 12px; }
.profile-badge span { background: #34d399; border-radius: 50%; height: 8px; width: 8px; }
.profile-identity h1 { color: #fff; font-size: clamp(29px, 4vw, 46px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.profile-position { color: #cffafe; font-family: "Prompt", sans-serif; font-size: 19px; font-weight: 300; margin: 0; }
.hero-contact { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 16px; min-width: 270px; padding: 18px; }
.hero-contact h2 { border-bottom: 1px solid rgba(255,255,255,.2); color: #cffafe; font-size: 12px; font-weight: 600; letter-spacing: .08em; margin: 0 0 12px; padding-bottom: 10px; text-transform: uppercase; }
.hero-contact a, .hero-contact p { align-items: center; color: #fff; display: flex; font-size: 14px; gap: 10px; margin: 9px 0; min-width: 0; }
.hero-contact a:hover { text-decoration: underline; }
.hero-contact a i, .hero-contact p i { align-items: center; background: rgba(255,255,255,.18); border-radius: 50%; display: flex; flex: 0 0 28px; height: 28px; justify-content: center; }
.hero-contact span { overflow-wrap: anywhere; }
.profile-hero-ribbon { align-items: center; background: rgba(0,0,0,.1); border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 18px 36px; justify-content: space-around; padding: 13px 40px; position: relative; text-align: center; z-index: 1; }
.profile-hero-ribbon span { font-size: 14px; }
.profile-hero-ribbon i { color: #cffafe; margin-right: 7px; }

.profile-layout { row-gap: 24px; }
.profile-card, .profile-tabs { background: #fff; border: 1px solid var(--profile-slate-200); border-radius: 16px; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); overflow: hidden; }
.profile-sidebar { align-self: flex-start; }
.contact-card { padding: 24px; }
.contact-card h2 { border-bottom: 1px solid var(--profile-slate-100); color: var(--profile-slate-500); font-size: 13px; font-weight: 600; letter-spacing: .06em; margin: 0 0 16px; padding-bottom: 13px; text-transform: uppercase; }
.contact-card h2 i { color: var(--profile-cyan); margin-right: 8px; }
.contact-card dl, .profile-detail-list { margin: 0; }
.contact-card dl div { display: grid; font-size: 14px; gap: 10px; grid-template-columns: 78px minmax(0, 1fr); margin-bottom: 15px; }
.contact-card dl div:last-child { margin-bottom: 0; }
.contact-card dt { color: var(--profile-slate-400); font-weight: 500; }
.contact-card dd { color: var(--profile-slate-700); margin: 0; overflow-wrap: anywhere; }
.profile-tabs { margin-bottom: 20px; padding: 8px; }
.profile-tabs .nav { flex-wrap: nowrap; gap: 7px; }
.profile-tabs .nav-link { border-radius: 11px; color: var(--profile-slate-500); font-size: 14px; font-weight: 600; padding: 10px 18px; text-align: center; }
.profile-tabs .nav-link.active { background: var(--profile-cyan); box-shadow: 0 6px 14px rgba(6,182,212,.2); color: #fff; }
.profile-tabs .nav-link i { margin-right: 6px; }
.profile-card { margin-bottom: 20px; }
.profile-card > header { align-items: center; background: var(--profile-slate-50); border-bottom: 1px solid var(--profile-slate-100); display: flex; justify-content: space-between; padding: 16px 22px; }
.profile-card > header h2 { align-items: center; color: var(--profile-slate-800); display: flex; font-size: 18px; font-weight: 700; margin: 0; }
.profile-card > header h2 > span { background: var(--profile-cyan); border-radius: 50%; height: 10px; margin-right: 10px; width: 10px; }
.profile-card > header h2 i { color: var(--profile-cyan); margin-right: 10px; }
.profile-card > header > span { background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 999px; color: var(--profile-cyan-dark); font-size: 11px; font-weight: 600; padding: 4px 10px; }
.profile-detail-list { padding: 8px 22px; }
.profile-detail-list div { border-bottom: 1px solid var(--profile-slate-100); display: grid; font-size: 14px; gap: 18px; grid-template-columns: 32% minmax(0, 1fr); padding: 14px 0; }
.profile-detail-list div:last-child { border-bottom: 0; }
.profile-detail-list dt { color: var(--profile-slate-500); font-weight: 500; }
.profile-detail-list dd { color: var(--profile-slate-800); font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.education-timeline { margin: 24px; padding-left: 30px; position: relative; }
.education-timeline::before { background: #bae6fd; bottom: 8px; content: ""; left: 7px; position: absolute; top: 8px; width: 2px; }
.education-item { margin-bottom: 28px; position: relative; }
.education-item:last-child { margin-bottom: 0; }
.timeline-dot { background: var(--profile-cyan); border: 4px solid #cffafe; border-radius: 50%; height: 16px; left: -30px; position: absolute; top: 3px; width: 16px; }
.education-level { color: #0891b2; font-size: 12px; font-weight: 700; letter-spacing: .04em; margin: 0 0 3px; text-transform: uppercase; }
.education-item h3 { color: var(--profile-slate-900); font-size: 18px; font-weight: 600; margin: 0 0 7px; }
.education-institute { color: var(--profile-slate-500); font-size: 14px; margin: 0; }
.education-institute i { color: var(--profile-slate-400); margin-right: 8px; }
.expertise-list, .research-list { padding: 22px; }
.expertise-item { align-items: center; background: var(--profile-slate-50); border: 1px solid var(--profile-slate-200); border-radius: 12px; display: flex; gap: 12px; margin-bottom: 12px; padding: 14px; }
.expertise-item:last-child { margin-bottom: 0; }
.expertise-icon { align-items: center; background: var(--profile-cyan-light); border-radius: 9px; color: var(--profile-cyan-dark); display: flex; flex: 0 0 36px; height: 36px; justify-content: center; }
.expertise-item h3 { color: var(--profile-slate-800); font-size: 15px; font-weight: 600; margin: 0; }
.expertise-item p { color: var(--profile-slate-500); font-size: 12px; margin: 3px 0 0; }
.research-item { border-bottom: 1px solid var(--profile-slate-100); padding: 0 0 18px; margin-bottom: 18px; }
.research-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.research-item h3 { color: var(--profile-slate-800); font-size: 16px; font-weight: 600; line-height: 1.55; margin: 0 0 9px; }
.research-item p { color: var(--profile-slate-500); font-size: 13px; margin: 4px 0; }
.research-item p i { color: var(--profile-cyan); margin-right: 8px; width: 14px; }
.calendar-card { padding: 14px; }
.calendar-frame { border: 0; display: block; height: 620px; width: 100%; }
.empty-state { color: var(--profile-slate-400); margin: 0; padding: 36px 22px; text-align: center; }
.profile-footer { background: #fff; border-top: 1px solid var(--profile-slate-200); color: var(--profile-slate-500); margin-top: 20px; padding: 22px 0; }
.profile-footer p { font-size: 12px; margin: 0; text-align: center; }

@media (max-width: 991.98px) {
  .profile-hero-content { grid-template-columns: auto minmax(0, 1fr); }
  .hero-contact { grid-column: 1 / -1; width: 100%; }
  .profile-sidebar { order: 2; }
  .profile-content { order: 1; }
}
@media (max-width: 767.98px) {
  .profile-main { padding-top: 20px; }
  .profile-hero { border-radius: 18px; }
  .profile-hero-content { grid-template-columns: 1fr; padding: 28px 20px; text-align: center; }
  .profile-photo-wrap { height: 168px; margin: auto; width: 136px; }
  .hero-contact { text-align: left; }
  .profile-hero-ribbon { padding: 12px 20px; }
  .profile-tabs { overflow-x: auto; }
  .profile-tabs .nav { min-width: max-content; }
  .profile-detail-list div { grid-template-columns: 1fr; gap: 4px; }
  .profile-card > header { align-items: flex-start; gap: 10px; }
  .profile-card > header > span { display: none; }
}
@media (max-width: 420px) {
  .profile-brand strong { font-size: 12px; }
  .profile-brand small { font-size: 9px; }
  .profile-tabs .nav-link { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
