/* Public educator profile (public/educator.blade.php) in the site's new design. Scoped under #eduProfile, ep-* classes.
   Same palette as the course page (course-detail.css): deep green, dark band, accent, cream and sage. */
#eduProfile {
    --ep-green: #004238;
    --ep-deep: #01372f;
    --ep-hero: #173f33;
    --ep-accent: #DDE48A;
    --ep-accent-2: #D5D52B;
    --ep-cream: #F6F5EE;
    --ep-sage: #E9ECE3;
    --ep-ink: #0c1f1a;
    --ep-muted: #5B6760;
    --ep-line: #E4E3DA;
    --ep-line-2: #D7D8CD;
    background: #fff;
    color: var(--ep-ink);
    font-size: 16px;
    line-height: 1.5;
}
#eduProfile *, #eduProfile *::before, #eduProfile *::after { box-sizing: border-box; }
#eduProfile section { scroll-margin-top: calc(var(--site-header-h, 76px) + 60px); }
:where(#eduProfile) h1, :where(#eduProfile) h2, :where(#eduProfile) h3 { margin: 0; color: var(--ep-green); font-weight: 500; }
:where(#eduProfile) p { margin: 0; }
:where(#eduProfile) ul, :where(#eduProfile) ol { margin: 0; padding: 0; list-style: none; }
:where(#eduProfile) a { text-decoration: none; color: inherit; }
#eduProfile img { display: block; max-width: 100%; }
#eduProfile svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.ep-wrap { max-width: 1240px; margin: 0 auto; padding: 88px 32px; }
.ep-cream { background: var(--ep-cream); }
.ep-sage { background: var(--ep-sage); }
.ep-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ep-green); margin-bottom: 16px !important; }
.ep-eyebrow::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.ep-h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.14; letter-spacing: -0.02em; }
.ep-h2-gap { margin-bottom: 34px; }
.ep-muted { color: var(--ep-muted); font-size: 15px; line-height: 1.7; }
.ep-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; margin-bottom: 36px; }
.ep-head > p { justify-self: end; max-width: 42ch; }
.ep-center { display: flex; justify-content: center; margin-top: 26px; }

/* buttons */
.ep-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ep-btn { display: inline-flex; align-items: center; gap: 12px; font: inherit; font-weight: 600; font-size: 14px; padding: 13px 20px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, transform .1s ease-out; }
.ep-btn:active { transform: scale(.97); }
#eduProfile .ep-btn svg { width: 16px; height: 16px; }
.ep-btn-dark { background: var(--ep-hero); color: #fff !important; }
.ep-btn-dark:hover { background: var(--ep-deep); }
.ep-btn-line { background: #fff; color: var(--ep-green) !important; border-color: var(--ep-line-2); }
.ep-btn-line:hover { border-color: var(--ep-green); }
.ep-btn-accent { background: var(--ep-accent); color: var(--ep-deep) !important; }
.ep-btn-accent:hover { background: var(--ep-accent-2); }
.ep-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .35); }
.ep-btn-ghost:hover { border-color: #fff; }

/* hero */
.ep-hero { background: var(--ep-cream); }
.ep-hero .ep-wrap { padding-top: 22px; padding-bottom: 64px; }
.ep-crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--ep-muted); margin-bottom: 40px; }
.ep-crumbs a:hover { color: var(--ep-green); text-decoration: underline; }
.ep-crumbs span:last-child { color: var(--ep-ink); }
.ep-hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.ep-hero h1 { font-size: 60.72px; line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 18px; }
.ep-lead { font-size: 18px; line-height: 1.6; color: var(--ep-muted); max-width: 52ch; margin-bottom: 22px !important; }
.ep-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 30px; }
.ep-meta li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ep-ink); }
#eduProfile .ep-meta svg { width: 16px; height: 16px; color: var(--ep-green); }
.ep-hero-media { position: relative; padding-bottom: 34px; max-width: 470px; justify-self: end; width: 100%; }
.ep-photo { position: relative; aspect-ratio: 1 / 1; border-radius: 10px 90px 10px 10px; overflow: hidden; background: var(--ep-hero); display: flex; align-items: center; justify-content: center; font-size: 96px; color: var(--ep-accent); }
.ep-photo span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ep-photo img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.ep-hero-note { position: absolute; left: -22px; bottom: 0; display: flex; align-items: center; gap: 14px; background: var(--ep-accent); border-radius: 8px; padding: 16px 22px 16px 18px; box-shadow: 0 18px 36px -24px rgba(12, 31, 26, .55); }
#eduProfile .ep-hero-note svg { width: 22px; height: 22px; color: var(--ep-green); }
.ep-hero-note b { display: block; font-size: 18px; font-weight: 600; color: var(--ep-ink); }
.ep-hero-note small { font-size: 12.5px; color: var(--ep-muted); }

/* key facts strip */
.ep-facts { background: var(--ep-cream); border-top: 1px solid var(--ep-line); }
.ep-facts .ep-wrap { padding-top: 26px; padding-bottom: 26px; display: grid; grid-template-columns: repeat(var(--ep-cols, 4), 1fr); gap: 24px; }
.ep-fact b { display: block; font-size: 30px; font-weight: 500; line-height: 1.1; color: var(--ep-green); letter-spacing: -0.01em; }
.ep-fact small { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ep-muted); }

/* section tabs */
.ep-tabs { position: sticky; top: var(--site-header-h, 76px); z-index: 20; background: #fff; border-top: 1px solid var(--ep-line); border-bottom: 1px solid var(--ep-line); }
.ep-tabs .ep-wrap { padding-top: 0; padding-bottom: 0; display: flex; gap: 34px; overflow-x: auto; scrollbar-width: none; }
.ep-tabs .ep-wrap::-webkit-scrollbar { display: none; }
.ep-tabs a { flex: none; padding: 19px 0 17px; font-size: 13.5px; color: var(--ep-muted); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.ep-tabs a:hover, .ep-tabs a.on { color: var(--ep-ink); border-bottom-color: var(--ep-green); }

/* top courses: the #1 course across the full width, #2–#5 in a row under it */
.ep-kicker { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ep-muted); }
.ep-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ep-tc { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--ep-line); border-radius: 12px; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .15s; }
.ep-tc:hover { border-color: var(--ep-green); box-shadow: 0 18px 36px -26px rgba(12, 31, 26, .5); transform: translateY(-2px); }
/* the picture box keeps its 16:10 shape whatever the photo's own size */
.ep-tc-img { position: relative; display: block; flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ep-sage); }
#eduProfile .ep-tc-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ep-rank { position: absolute; top: 12px; left: 12px; background: var(--ep-hero); color: var(--ep-accent); font-size: 13px; font-weight: 700; border-radius: 6px; padding: 5px 10px; }
.ep-tc-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 18px 18px 16px; }
.ep-tc-body > b { font-weight: 500; font-size: 18px; line-height: 1.3; color: var(--ep-green); }
.ep-tc-desc { font-size: 14px; line-height: 1.65; color: var(--ep-muted); }
.ep-tc-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ep-muted); }
.ep-tc-stats > span { display: inline-flex; align-items: center; gap: 6px; }
#eduProfile .ep-tc-stats svg { width: 15px; height: 15px; }
.ep-learners { font-weight: 600; color: var(--ep-green) !important; background: var(--ep-sage); border-radius: 20px; padding: 4px 10px; }
.ep-learners.is-new { font-weight: 500; color: var(--ep-muted) !important; background: var(--ep-cream); }
.ep-tc-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ep-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ep-tc-foot em { font-style: normal; font-weight: 600; font-size: 15px; color: var(--ep-ink); }
.ep-tc-go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ep-green); }
#eduProfile .ep-tc-go svg { width: 14px; height: 14px; transition: transform .15s ease-out; }
.ep-tc:hover .ep-tc-go svg { transform: translate(2px, -2px); }
/* #1: a wide card, picture on the left */
.ep-tc.is-lead { grid-column: 1 / -1; flex-direction: row; margin-bottom: 42px; } /* more room before the row under it */
.ep-tc.is-lead .ep-tc-img { width: 46%; aspect-ratio: auto; min-height: 300px; }
.ep-tc.is-lead .ep-tc-body { padding: 30px 32px 26px; gap: 14px; }
.ep-tc.is-lead .ep-tc-body > b { font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
.ep-tc.is-lead .ep-tc-desc { font-size: 15px; }
.ep-tc.is-lead .ep-rank { font-size: 15px; padding: 6px 12px; background: var(--ep-accent); color: var(--ep-deep); }
/* fewer than four cards under #1 share the row */
.ep-top:has(> .ep-tc:nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }
.ep-top:has(> .ep-tc:nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ep-top:has(> .ep-tc:nth-child(4):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ep-top:has(> .ep-tc:nth-child(2):last-child) .ep-tc:not(.is-lead) { flex-direction: row; }
.ep-top:has(> .ep-tc:nth-child(2):last-child) .ep-tc:not(.is-lead) .ep-tc-img { width: 34%; aspect-ratio: auto; }

/* more courses */
.ep-more-head { display: flex; align-items: baseline; gap: 12px; margin: 52px 0 16px; }
.ep-more-head h3 { font-size: 22px; }
.ep-more-head small { font-size: 13px; color: var(--ep-muted); }
.ep-more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ep-mc { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--ep-line); border-radius: 10px; padding: 10px; transition: border-color .15s; }
.ep-mc[hidden] { display: none; }
.ep-mc:hover { border-color: var(--ep-green); }
.ep-mc img { width: 72px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; background: var(--ep-sage); }
.ep-mc span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ep-mc b { font-weight: 500; font-size: 14px; line-height: 1.3; color: var(--ep-green); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-mc i { font-style: normal; font-size: 12px; color: var(--ep-muted); }

/* about */
.ep-about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 72px; align-items: start; }
.ep-about .ep-h2 { margin-bottom: 22px; }
.ep-body p { font-size: 16px; line-height: 1.8; color: #33433d; margin-bottom: 16px !important; }
.ep-glance { background: var(--ep-cream); border-radius: 12px; padding: 26px 24px; }
.ep-glance h3 { font-size: 20px; margin-bottom: 16px; }
.ep-glance li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ep-line-2); }
.ep-glance li:first-child { border-top: 0; padding-top: 0; }
#eduProfile .ep-glance li svg { color: var(--ep-green); margin-top: 2px; }
.ep-glance li span { font-size: 14.5px; color: var(--ep-ink); line-height: 1.45; }
.ep-glance li small { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ep-muted); margin-bottom: 2px; }
.ep-glance-link { padding: 0; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ep-green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ep-glance-link:hover { color: var(--ep-deep); }
.ep-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ep-line-2); }
.ep-social a, .ep-social button { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--ep-line-2); border-radius: 50%; padding: 0; color: var(--ep-green); cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.ep-social a:hover, .ep-social button:hover { border-color: var(--ep-green); background: var(--ep-green); color: #fff; }
#eduProfile .ep-social svg { width: 18px; height: 18px; }

/* education & experience */
.ep-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ep-card { background: #fff; border-radius: 12px; padding: 26px 26px 22px; }
.ep-card h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 20px; }
#eduProfile .ep-card h3 svg { color: var(--ep-green); }
.ep-timeline { position: relative; padding-left: 22px; }
.ep-timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--ep-line); }
.ep-timeline li { position: relative; padding-bottom: 20px; }
.ep-timeline li:last-child { padding-bottom: 0; }
.ep-timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ep-accent-2); box-shadow: 0 0 0 3px #fff; }
.ep-timeline small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ep-muted); }
.ep-timeline b { display: block; font-weight: 600; font-size: 15.5px; color: var(--ep-ink); margin: 3px 0 2px; }
.ep-timeline span { font-size: 14px; color: var(--ep-muted); }

/* each part (research, publications, conferences, achievements, activities) is its own group and tab target */
#eduProfile [id] { scroll-margin-top: calc(var(--site-header-h, 76px) + 72px); }
.ep-group + .ep-group { margin-top: 44px; }
.ep-group-h { display: flex; align-items: baseline; gap: 10px; font-size: 22px; margin-bottom: 6px; }
.ep-group-h small { font-size: 13px; font-weight: 600; color: var(--ep-muted); background: var(--ep-sage); border-radius: 20px; padding: 2px 9px; }
.ep-cream .ep-group-h small { background: #fff; }

/* research, publications, recognition */
.ep-pubs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.ep-pub { padding: 20px 0; border-top: 1px solid var(--ep-line-2); display: flex; flex-direction: column; gap: 5px; }
.ep-pub small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ep-green); }
.ep-pub b { font-weight: 500; font-size: 17px; line-height: 1.4; color: var(--ep-ink); }
.ep-pub b a:hover { color: var(--ep-green); text-decoration: underline; }
.ep-pub span { font-size: 14px; line-height: 1.6; color: var(--ep-muted); }

/* call to action band */
.ep-cta { background: var(--ep-hero); color: #fff; }
.ep-cta .ep-wrap { padding-top: 60px; padding-bottom: 60px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.ep-cta h2 { color: #fff; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.02em; }
.ep-cta p { color: rgba(255, 255, 255, .78); margin-top: 6px !important; }

/* contact popup */
.ep-modal { position: fixed; inset: 0; z-index: 1200; background: rgba(1, 55, 47, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ep-modal[hidden] { display: none; }
.ep-modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; box-shadow: 0 24px 60px -16px rgba(1, 55, 47, .55); }
.ep-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--ep-line); }
.ep-modal-head h3 { font-size: 24px; }
.ep-modal-head p { font-size: 13.5px; color: var(--ep-muted); margin-top: 4px !important; }
.ep-modal-x { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: var(--ep-cream); color: var(--ep-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.ep-form { padding: 20px 24px 24px; }
.ep-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ep-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.ep-field label { font-size: 13px; font-weight: 600; color: var(--ep-ink); margin: 0; }
.ep-field label span { color: #c0392b; }
#eduProfile .ep-field input, #eduProfile .ep-field textarea { width: 100%; border: 1px solid var(--ep-line-2); border-radius: 6px; background: #fff; padding: 11px 13px; font: inherit; font-size: 14.5px; color: var(--ep-ink); box-shadow: none; height: auto; }
#eduProfile .ep-field textarea { resize: vertical; min-height: 110px; }
#eduProfile .ep-field input:focus, #eduProfile .ep-field textarea:focus { outline: none; border-color: var(--ep-green); box-shadow: 0 0 0 3px rgba(0, 66, 56, .1); }

@media (max-width: 1100px) {
    #eduProfile .ep-top { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .ep-tc.is-lead .ep-tc-img { width: 42%; }
    .ep-more { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    .ep-wrap { padding: 60px 20px; }
    .ep-hero-grid, .ep-about, .ep-two, .ep-head { grid-template-columns: 1fr; gap: 36px; }
    .ep-head > p { justify-self: start; }
    .ep-hero-media { justify-self: start; max-width: 380px; }
    .ep-hero-note { left: 12px; }
    .ep-facts .ep-wrap { grid-template-columns: repeat(3, 1fr); }
    .ep-pubs { grid-template-columns: 1fr; }
    .ep-more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .ep-wrap { padding: 48px 16px; }
    .ep-hero h1 { font-size: 44px; }
    .ep-facts .ep-wrap { grid-template-columns: 1fr 1fr; }
    #eduProfile .ep-top { grid-template-columns: 1fr !important; }
    #eduProfile .ep-tc { flex-direction: column !important; }
    #eduProfile .ep-tc .ep-tc-img { width: 100% !important; aspect-ratio: 16 / 10 !important; min-height: 0; }
    .ep-tc.is-lead .ep-tc-body { padding: 20px 18px 18px; }
    .ep-tc.is-lead .ep-tc-body > b { font-size: 22px; }
    .ep-more { grid-template-columns: 1fr; }
    .ep-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    #eduProfile * { transition: none !important; }
}
