:root {
    --ink: #1f2933;
    --muted: #667085;
    --border: #d9dee7;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --navy: #00274c;
    --blue: #1f6fb2;
    --gold: #c98a12;
}

* {
    box-sizing: border-box;
}

body {
    background: #f3f5f8;
    color: var(--ink);
    overflow-x: hidden;
}

a {
    color: var(--blue);
}

a:hover {
    color: #124d80;
}

.page-shell {
    width: calc(100% - 32px);
    max-width: 1120px;
    padding: 28px 0 48px;
    text-align: left;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(150px, 185px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.intro-sidebar,
.intro-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-photo-frame {
    height: 300px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(21, 35, 54, 0.12);
}

.profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0%;
    transform: scale(1.7);
    transform-origin: center top;
}

.intro-card,
.section-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(21, 35, 54, 0.07);
    overflow-wrap: anywhere;
}

.intro-card .card-body,
.section-card .card-body {
    padding: 1.35rem;
}

.identity-card {
    border-top: 4px solid var(--navy);
}

.identity-card .card-body {
    padding: 1.35rem 1.5rem;
}

.identity-block h1 {
    margin: 0 0 0.5rem;
    color: var(--navy);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
}

.identity-block h1 a {
    margin-left: 0.35rem;
    font-size: 1.1rem;
    text-decoration: none;
    vertical-align: middle;
}

.role-line {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.45;
}

.bio-card {
    height: 100%;
}

.bio-card p {
    margin-bottom: 0.9rem;
}

.bio-card p:last-child {
    margin-bottom: 0;
}

.contact-block {
    font-size: 0.86rem;
    line-height: 1.4;
}

.contact-block .card-body {
    padding: 1rem;
}

.contact-title {
    margin: 0 0 0.55rem;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
}

.contact-line {
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.lab-logo {
    display: block;
    width: 120px;
    max-width: 72%;
    height: auto;
    margin: 0.65rem 0 0.4rem;
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-top: 0.65rem;
}

.profile-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-soft);
}

.profile-links img {
    width: auto;
    max-width: 22px;
    height: 22px;
}

.section-card {
    margin-top: 1.25rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.35rem;
    border-bottom: 1px solid var(--border);
    background: #f9fafc;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.section-header > span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.featured-projects-card {
    border-color: #b8cbe0;
    box-shadow: 0 18px 40px rgba(0, 39, 76, 0.12);
}

.featured-projects-header {
    align-items: end;
    border-bottom: 0;
    background: linear-gradient(135deg, #00274c 0%, #0c4f85 100%);
    color: #ffffff;
}

.featured-projects-header > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.featured-projects-header > span {
    color: rgba(255, 255, 255, 0.82);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.18rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffde8a;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comfortable-list,
.project-list,
.publication-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.65;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.25rem;
    padding-left: 0;
    list-style: none;
}

.project-list li {
    padding-right: 0;
}

.featured-projects-card .card-body {
    padding: 1rem;
    background:
        radial-gradient(circle at top right, rgba(201, 138, 18, 0.1), transparent 32%),
        linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
}

.featured-projects-card .project-list {
    gap: 0.85rem;
}

.featured-projects-card .project-list li {
    min-height: 100%;
}

.featured-projects-card .project-list a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(16, 38, 64, 0.08);
    color: var(--navy);
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
}

.featured-projects-card .project-list a::after {
    content: "\2197";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 1.9rem;
    height: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 1rem;
    transform: translateY(-50%);
}

.featured-projects-card .project-list a:hover {
    border-color: #a9c8e7;
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(16, 38, 64, 0.14);
    color: #0e4d7d;
    transform: translateY(-2px);
}

.publications-scroll {
    max-height: 660px;
    overflow-y: auto;
}

.publication-list {
    padding-left: 0;
    list-style: none;
}

.publication-list li {
    padding: 0.95rem 0;
    border-bottom: 1px solid #edf0f5;
}

.publication-list li:first-child {
    padding-top: 0;
}

.publication-list li:last-child {
    border-bottom: 0;
}

.code-link {
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    font-size: 0.82em;
}

.code-link:hover {
    text-decoration: underline;
}

.pub-venue {
    color: var(--muted);
    font-weight: 600;
}

.badge {
    margin-right: 0.25rem;
    border-radius: 4px;
    font-weight: 600;
}

.systems-list {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
}

.system-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    background: var(--surface-soft);
}

.system-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 135px;
    border-radius: 8px;
    background: var(--surface);
}

.system-media img {
    max-width: 88%;
    max-height: 130px;
    object-fit: contain;
}

.system-copy h3 {
    margin: 0 0 0.45rem;
    color: var(--navy);
    font-size: 1.05rem;
    line-height: 1.35;
}

.system-copy p {
    margin-bottom: 0.7rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.45rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.project-btn,
.publication-btn {
    background: #eef6ff;
    border-color: #c9e2fb;
    color: #155c99;
}

.github-btn {
    background: #f3f4f6;
    border-color: #d8dde5;
    color: #202632;
}

.youtube-btn {
    background: #fff1f1;
    border-color: #f6cdcd;
    color: #a11d1d;
}

.btn:hover {
    text-decoration: none;
    filter: brightness(0.97);
}

.install-instructions {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.install-link {
    font-weight: 700;
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #edf0f5;
}

.sponsor-logos img {
    width: auto;
    max-width: 170px;
    max-height: 58px;
    object-fit: contain;
}

.prospective-students-badge {
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .intro-grid {
        grid-template-columns: minmax(150px, 185px) minmax(0, 1fr);
        gap: 1rem;
    }

    .profile-photo {
        height: 310px;
    }

    .project-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639.98px) {
    .page-shell {
        width: calc(100% - 24px);
        max-width: 640px;
        padding-top: 18px;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .intro-sidebar {
        width: 100%;
        max-width: min(100%, 390px);
        margin: 0 auto;
    }

    .intro-card,
    .section-card {
        max-width: 100%;
    }

    .contact-block {
        max-width: calc(100vw - 24px);
    }

    .profile-photo {
        width: 100%;
        height: 100%;
    }

    .profile-photo-frame {
        width: 190px;
        height: 240px;
        margin: 0 auto;
    }

    .identity-block h1 {
        font-size: 1.65rem;
    }

    .section-header {
        display: block;
    }

    .section-header > span {
        display: block;
        margin-top: 0.25rem;
    }

    .featured-projects-header {
        align-items: start;
    }

    .featured-projects-card .project-list a {
        padding-right: 3.2rem;
    }

    .system-card {
        grid-template-columns: 1fr;
    }

    .system-media {
        min-height: auto;
        padding: 1rem;
    }

    .publications-scroll {
        max-height: none;
        overflow: visible;
    }
}
