/* The Imlers Custom Profile — Public Styles
   Clean modern aesthetic, Inter/system font, strong black titles
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --lp-black:   #0a0a0a;
    --lp-ink:     #111827;
    --lp-body:    #374151;
    --lp-muted:   #6b7280;
    --lp-subtle:  #9ca3af;
    --lp-rule:    #e5e7eb;
    --lp-surface: #f9fafb;
    --lp-accent:  #2563eb;
    --lp-accent-lt: #eff6ff;
    --lp-current: #059669;
    --lp-font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --lp-radius:  8px;
    --lp-shadow:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

/* ================================================================
   Profile card
   ================================================================ */
.til-lp-profile-card {
    font-family: var(--lp-font);
    padding: 0 0 4px;
    margin: 0 0 8px;
}

.til-lp-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--lp-black);
    letter-spacing: -.5px;
    line-height: 1.2;
    margin: 0 0 6px;
}

.til-lp-headline {
    font-size: 15px;
    font-weight: 400;
    color: var(--lp-body);
    margin: 0 0 10px;
    line-height: 1.55;
}

.til-lp-li-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lp-accent);
    text-decoration: none;
    letter-spacing: .1px;
}
.til-lp-li-link:hover { text-decoration: underline; }
.til-lp-li-icon {
    width: 15px; height: 15px;
    fill: currentColor; flex-shrink: 0;
}

/* ================================================================
   About — raw text, inherits all theme styles
   ================================================================ */
.til-lp-about-text {
    font-family: var(--lp-font);
    font-size: 15px;
    line-height: 1.75;
    color: var(--lp-black);
}

/* ================================================================
   Section wrapper — used by experience, education, publications,
   awards; provides the clean card container
   ================================================================ */
.til-lp-section {
    font-family: var(--lp-font);
    background: #fff;
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow);
    overflow: hidden;
    margin: 0 0 20px;
}

/* ================================================================
   Entry list — experience & education
   ================================================================ */
.til-lp-list {
    list-style: none;
    margin: 0; padding: 0;
}

.til-lp-entry {
    display: grid;
    grid-template-columns: 140px 1fr;
    border-bottom: 1px solid var(--lp-rule);
}
.til-lp-entry:last-child { border-bottom: none; }

/* Left column: date + badge */
.til-lp-entry-left {
    padding: 18px 16px 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    border-right: 1px solid var(--lp-rule);
    background: var(--lp-surface);
    flex-shrink: 0;
}

.til-lp-entry-date {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--lp-muted);
    letter-spacing: .3px;
    text-transform: uppercase;
    line-height: 1.4;
}

.til-lp-badge-current {
    display: inline-block;
    background: var(--lp-current);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
}

/* Right column: content */
.til-lp-entry-right {
    min-width: 0;
}

/* Entry header button */
.til-lp-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: background .12s;
    font-family: var(--lp-font);
}
.til-lp-entry-header:hover { background: var(--lp-surface); }
.til-lp-entry-header.no-toggle { cursor: default; }
.til-lp-entry-header.no-toggle:hover { background: none; }
.til-lp-entry-header[aria-expanded="true"] { background: var(--lp-accent-lt); }

/* Title + sub stack inside button */
.til-lp-entry-header > *:first-child,
.til-lp-pub-body-wrap,
.til-lp-award-body-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.til-lp-entry-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--lp-black);
    line-height: 1.3;
    letter-spacing: -.1px;
}

/* Publication title links */
a.til-lp-entry-title,
.til-lp-pub-link {
    color: var(--lp-accent);
    text-decoration: none;
}
a.til-lp-entry-title:hover,
.til-lp-pub-link:hover { text-decoration: underline; }

.til-lp-entry-sub {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--lp-body);
    line-height: 1.4;
}

.til-lp-entry-meta {
    display: block;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--lp-muted);
    line-height: 1.4;
}

/* Chevron */
.til-lp-chevron {
    width: 18px; height: 18px;
    flex-shrink: 0;
    stroke: var(--lp-muted);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-top: 1px;
    transition: transform .22s ease;
}
.til-lp-entry-header[aria-expanded="true"] .til-lp-chevron {
    transform: rotate(180deg);
    stroke: var(--lp-accent);
}

/* Expanded body */
.til-lp-entry-body {
    font-family: var(--lp-font);
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--lp-body);
    padding: 0 20px 18px 20px;
    border-top: 1px solid var(--lp-rule);
    animation: lp-fade-in .2s ease;
}
.til-lp-entry-body[hidden] { display: none; }

@keyframes lp-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   External icon link — small icon beside title, no text
   ================================================================ */
.til-lp-entry-title-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.til-lp-ext-icon {
    display: inline-flex;
    align-items: center;
    color: var(--lp-muted);
    flex-shrink: 0;
    text-decoration: none;
    transition: color .15s;
    line-height: 1;
}
.til-lp-ext-icon:hover { color: var(--lp-accent); }
.til-lp-ext-icon svg {
    width: 13px; height: 13px;
    stroke: currentColor; stroke-width: 2;
    fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ================================================================
   Media date placeholder (no date set)
   ================================================================ */
.til-lp-entry-date--none { color: var(--lp-rule); }

/* ================================================================
   Error
   ================================================================ */
.til-lp-error {
    font-family: var(--lp-font);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--lp-radius);
    padding: 12px 16px;
    color: #b91c1c;
    font-size: 13.5px;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 640px) {
    .til-lp-entry {
        grid-template-columns: 1fr;
    }
    .til-lp-entry-left {
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
        border-right: none;
        border-bottom: 1px solid var(--lp-rule);
        background: var(--lp-surface);
        gap: 10px;
    }
    .til-lp-entry-header { padding: 14px; }
    .til-lp-entry-body   { padding: 0 14px 14px; }
    .til-lp-name { font-size: 22px; }
    /* Stack image below text on small screens */
    .til-lp-entry-body-wrap.has-image {
        flex-direction: column;
    }
    .til-lp-entry-img-wrap {
        width: 100%;
        height: 140px;
    }
}
@media (max-width: 400px) {
}

/* ================================================================
   Entry body wrapper — text + optional image side by side
   ================================================================ */
.til-lp-entry-body-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* When image present: image on right, text fills left */
.til-lp-entry-body-wrap.has-image {
    flex-direction: row-reverse;
    gap: 16px;
}

.til-lp-entry-text {
    flex: 1;
    min-width: 0;
}

/* Entry image */
.til-lp-entry-img-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid var(--lp-rule);
    background: var(--lp-surface);
}

.til-lp-entry-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .15s;
}

/* Clickable image popout */
a.til-lp-img-popout {
    display: block;
    width: 100%; height: 100%;
    position: relative;
    text-decoration: none;
}
a.til-lp-img-popout:hover .til-lp-entry-img { opacity: .82; }

.til-lp-img-popout-icon {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.28);
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
    border-radius: 7px;
}
a.til-lp-img-popout:hover .til-lp-img-popout-icon { opacity: 1; }
.til-lp-img-popout-icon svg {
    width: 20px; height: 20px;
    stroke: #fff; stroke-width: 2;
    fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}

/* Entry title as link */
a.til-lp-entry-link,
a.til-lp-entry-title {
    color: var(--lp-accent);
    text-decoration: none;
}
a.til-lp-entry-link:hover,
a.til-lp-entry-title:hover { text-decoration: underline; }

/* ================================================================
   Lightbox popout
   ================================================================ */
.til-lp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.til-lp-lightbox[hidden] { display: none; }

.til-lp-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    animation: lp-backdrop-in .2s ease;
}
@keyframes lp-backdrop-in {
    from { opacity: 0; } to { opacity: 1; }
}

.til-lp-lightbox-panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    max-width: min(92vw, 860px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: lp-panel-in .22s cubic-bezier(.22,1,.36,1);
}
@keyframes lp-panel-in {
    from { opacity: 0; transform: scale(.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.til-lp-lightbox-close {
    position: absolute;
    top: 10px; right: 12px;
    width: 32px; height: 32px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    transition: background .15s;
}
.til-lp-lightbox-close:hover { background: rgba(0,0,0,.8); }

.til-lp-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 52px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.til-lp-lightbox-ext {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-family: var(--lp-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--lp-accent);
    text-decoration: none;
    border-top: 1px solid var(--lp-rule);
    background: var(--lp-surface);
    flex-shrink: 0;
}
.til-lp-lightbox-ext:empty { display: none; }
.til-lp-lightbox-ext:hover { text-decoration: underline; }

/* ================================================================
   Media — date placeholder for items with no date
   ================================================================ */
.til-lp-entry-date--none {
    color: var(--lp-rule);
}

/* ================================================================
   Publication type badge
   ================================================================ */
.til-lp-pub-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 4px;
    background: var(--lp-surface);
    color: var(--lp-muted);
    border: 1px solid var(--lp-rule);
}

.til-lp-pub-type--journal             { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.til-lp-pub-type--book                { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.til-lp-pub-type--oral_presentation   { background: #fef9ec; color: #92400e; border-color: #fde68a; }
.til-lp-pub-type--poster_presentation { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; }
