:root {
    --page-bg: #eef2f4;
    --surface: #ffffff;
    --surface-soft: #f5f7fb;
    --surface-warm: #ffffff;
    --text: #18202a;
    --muted: rgba(24, 32, 42, 0.68);
    --accent: #1e5fa8;
    --accent-secondary: #1e5fa8;
    --accent-warm: #ffffff;
    --card-border: rgba(24, 32, 42, 0.12);
    --nav-border: rgba(255, 255, 255, 0.12);
    --nav-bg: rgba(21, 32, 43, 0.94);
    --shadow: 0 8px 24px rgba(24, 32, 42, 0.08);
    --shadow-hover: 0 18px 40px rgba(24, 32, 42, 0.16);
    --radius: 16px;
    --container: 980px;
    --narrow: 720px;
    --nav-height: 48px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(150deg, #e6edf6 0%, #ffffff 100%);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    color: var(--text);
    font-family: "Newsreader", Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

p {
    margin: 0 0 1rem;
    max-width: 70ch;
    color: var(--text);
}

small,
.caption {
    font-size: 13px;
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(calc(100% - 32px), var(--narrow));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    top: 10px;
    left: 16px;
    z-index: 1200;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow);
    transform: translateY(-180%);
    transition: transform 0.2s ease;
}

.skip-link:hover {
    color: #ffffff;
    text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.navbar {
    position: relative;
    min-height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--page-bg);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.brand:hover {
    color: var(--page-bg);
    text-decoration: none;
    transform: translateY(-1px);
}

.brand:focus-visible {
    color: var(--page-bg);
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--page-bg);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 999px;
    background: var(--page-bg);
    opacity: 0;
    transform: scaleX(0.65);
    transform-origin: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-links a:hover::after {
    opacity: 0.9;
    transform: scaleX(1);
}

.nav-links a[aria-current="page"],
.nav-links a[aria-current="location"] {
    color: var(--page-bg);
}

.nav-links a[aria-current="page"]::after,
.nav-links a[aria-current="location"]::after {
    background: var(--page-bg);
    opacity: 1;
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
    width: 18px;
    height: 1.5px;
    border-radius: 999px;
    background: var(--page-bg);
}

main {
    padding-top: var(--nav-height);
}

main:focus {
    outline: none;
}

.hero,
.page-intro,
.page-section {
    padding: 40px 0;
}

.hero {
    padding-top: 52px;
}

.home-hero {
    padding-bottom: 12px;
}

.top-aligned-section {
    padding-top: 52px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas:
        "photo bio"
        "meta bio";
    gap: 32px;
    align-items: start;
}

.hero-photo-column {
    grid-area: photo;
    display: flex;
    width: 260px;
}

.hero-profile-meta {
    grid-area: meta;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 4px;
    width: 260px;
}

.hero-photo-rect {
    width: 260px;
    aspect-ratio: 1 / 1;
    min-height: 0;
    border-radius: 16px;
    object-fit: cover;
    object-position: center 18%;
    box-shadow: var(--shadow);
    margin: 0 auto 8px;
}

.hero-identity {
    display: grid;
    gap: 4px;
    justify-items: start;
    text-align: left;
    line-height: 1.6;
}

.profile-name {
    margin-bottom: 10px;
    font-size: clamp(32px, 4vw, 36px);
    letter-spacing: -0.015em;
}


.profile-title,
.profile-school {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 15px;
}

.profile-title {
    margin-bottom: 4px;
}

.hero-pronunciation {
    color: rgba(30, 95, 168, 0.86);
    font-style: italic;
}

.hero-contact-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.hero-contact-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 247, 251, 0.92));
    color: var(--muted);
    box-shadow: var(--shadow);
}

.hero-contact-icons a:hover {
    color: var(--text);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.hero-contact-icons a:active {
    transform: scale(0.96);
}

.hero-contact-icons a svg {
    width: 18px;
    height: 18px;
}

.cv-badge {
    padding: 0 14px;
    min-width: 40px;
    width: auto;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.hero-bio {
    grid-area: bio;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 0 0 0 28px;
    border-left: 1.5px solid rgba(30, 95, 168, 0.14);
    min-height: 260px;
}

.intro-paragraph {
    max-width: 66ch;
    margin: 0;
    color: var(--text);
    font-size: clamp(19px, 2vw, 21px);
    line-height: 1.75;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 980px;
    border: 1px solid transparent;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(94, 86, 83, 0.06);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(94, 86, 83, 0.14);
    text-decoration: none;
}

.button:active {
    transform: scale(0.97);
}

.button-primary {
    background: var(--accent);
    color: #ffffff;
}

.button-primary:hover {
    color: #ffffff;
    background: #005bb5;
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--accent-warm);
}

.button-secondary:hover {
    color: var(--text);
    background: rgba(29, 29, 31, 0.04);
}

.page-intro {
    padding-top: 28px;
    padding-bottom: 12px;
}

.page-intro h1 + p {
    color: var(--muted);
}

.detail-page-title {
    font-size: clamp(26px, 3.6vw, 34px);
    margin-bottom: 0;
    text-align: left;
    letter-spacing: -0.015em;
}

.detail-page-intro {
    padding-bottom: 0;
}

.detail-page-intro .back-link {
    margin-bottom: 28px;
}

.detail-page-section {
    padding-top: 24px;
}

.intro-text {
    width: 100%;
    padding-top: 8px;
}

.intro-text p {
    max-width: 66ch;
    margin: 0 0 1.15rem;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.72;
}

.intro-text p:first-child {
    color: var(--text);
}

.updates-section {
    font-size: 15px;
    padding-top: 48px;
}

.home-stack-section {
    padding-top: 40px;
    padding-bottom: 0;
}

.research-overview-section {
    margin-top: 0;
    padding-top: 48px;
    padding-bottom: 12px;
}

.home-block-title {
    margin-bottom: 24px;
    color: var(--muted);
    font-family: "Newsreader", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.updates-shell {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    width: 100%;
}

.updates-shell::after {
    display: none;
}

.updates-scroller {
    width: 100%;
    max-height: 550px;
    overflow-y: auto;
    padding: 8px 18px 52px;
    border: 1px solid rgba(30, 95, 168, 0.14);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(24, 32, 42, 0.05), 0 14px 36px rgba(24, 32, 42, 0.08);
}

.update-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    min-height: 72px;
    padding: 0;
    border-bottom: 1px solid rgba(30, 95, 168, 0.12);
    align-items: center;
}

.update-item:last-child {
    border-bottom: 0;
}

.update-date,
.update-text {
    margin: 0;
    max-width: 800px;
    line-height: 1.5;
}

.update-date {
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}

.update-text {
    color: var(--muted);
}

.section-heading {
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    gap: 24px;
}

.card-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.95fr);
    gap: 24px;
}

.info-list {
    margin: 0;
}

.info-list div + div {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

.info-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.info-list dd {
    margin: 0;
    color: var(--text);
}

.card-subtitle,
.card-meta {
    color: var(--muted);
}

.card-meta {
    margin-bottom: 0;
}

.project-list {
    display: grid;
    gap: 18px;
}

.project-link-card {
    position: relative;
    display: block;
    background: #ffffff;
    border: 1px solid rgba(30, 95, 168, 0.13);
    border-top: 3px solid var(--accent);
    border-left: none;
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: 0 2px 6px rgba(24, 32, 42, 0.05), 0 14px 36px rgba(24, 32, 42, 0.10);
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-top-color 0.2s ease;
}

.project-link-card h3 {
    margin-bottom: 8px;
    font-size: 22px;
    transition: color 0.2s ease;
}

.project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.project-card-meta span {
    display: inline-flex;
    align-items: center;
}

.project-card-meta span + span::before {
    content: "\00b7";
    margin-right: 8px;
    color: rgba(30, 95, 168, 0.45);
}

.project-image-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    transition: box-shadow 0.25s ease;
}

.project-image-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(29, 29, 31, 0.78);
    color: #ffffff;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.project-image-badge svg {
    width: 15px;
    height: 15px;
}

.project-media-row {
    display: grid;
    grid-template-columns: minmax(120px, 22%) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin: 16px 0 14px;
}

.project-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.zoomable-image {
    cursor: zoom-in;
}

.project-image-frame:hover .project-card-image,
.project-link-card:focus-visible .project-card-image {
    transform: scale(1.06);
}

.project-card-note {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.project-link-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.project-keypoints {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.project-keypoints li + li {
    margin-top: 0.3rem;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(29, 29, 31, 0.68);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox:not([hidden]) {
    animation: lightboxFadeIn 0.28s ease;
}

.image-lightbox-img {
    max-width: min(1100px, 92vw);
    max-height: 86vh;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    background: var(--surface);
    animation: lightboxImageIn 0.32s ease;
}

.image-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.image-lightbox-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.70);
    outline-offset: 3px;
    background: rgba(255, 255, 255, 0.20);
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lightboxImageIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-link-card:hover {
    transform: translateY(-2px);
    border-top-color: #2a75c8;
    box-shadow: 0 4px 10px rgba(24, 32, 42, 0.05), 0 14px 30px rgba(24, 32, 42, 0.10);
    text-decoration: none;
}

.project-link-card:focus-visible {
    outline: 2px solid rgba(30, 95, 168, 0.40);
    outline-offset: 4px;
}

.project-link-card:hover h3,
.project-link-card:focus-visible h3 {
    color: var(--accent);
}

.project-link-card:hover .project-image-frame,
.project-link-card:focus-visible .project-image-frame {
    box-shadow: var(--shadow-hover);
}

.project-link-card:hover .project-image-badge,
.project-image-frame:hover .project-image-badge,
.project-link-card:focus-visible .project-image-badge {
    opacity: 1;
    transform: translateY(0);
}

.project-link-card:active {
    transform: scale(0.98);
}

.detail-card h2 {
    margin-top: 28px;
    margin-bottom: 16px;
    color: var(--muted);
    font-family: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.3;
}

.detail-card h2:first-child {
    margin-top: 0;
}

.detail-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(24, 32, 42, 0.05), 0 14px 36px rgba(24, 32, 42, 0.10);
}

.detail-card p {
    max-width: none;
}

.detail-copy {
    margin-bottom: 28px;
}

.detail-copy p {
    max-width: none;
}

.detail-copy .detail-question-list {
    max-width: none;
}

.detail-publications-card {
    border: 0;
}

.detail-question-intro {
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 500;
}

.detail-question-list {
    margin: 0 0 1.4rem;
    padding-left: 1.2rem;
    color: var(--text);
}

.detail-question-list li {
    line-height: 1.7;
}

.detail-question-list li + li {
    margin-top: 0.45rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--accent);
}

.back-link:hover {
    color: var(--accent);
}

.pub-list {
    display: grid;
    gap: 0;
}

.pub-item {
    display: grid;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--card-border);
}

.pub-item:first-child {
    border-top: 0;
}

.pub-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.pub-citation {
    font-size: 15px;
}

.pub-authors {
    color: var(--muted);
    font-weight: 400;
}

.pub-title {
    display: block;
    margin: 2px 0 4px;
    color: var(--text);
    font-style: italic;
    font-weight: 600;
}

.pub-author-self {
    color: var(--accent);
    font-weight: inherit;
}

.pub-venue {
    color: var(--muted);
    font-style: italic;
    font-weight: 400;
}

.pdf-card {
    display: grid;
    gap: 14px;
    width: 100%;
    margin: 0 auto;
    padding: 12px;
}

.cv-page-intro {
    padding-bottom: 4px;
}

.cv-page-section {
    padding-top: 24px;
}

.pdf-frame {
    width: 100%;
    min-height: 1180px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
}

.pdf-fallback {
    margin: 0;
    max-width: none;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

.cv-page-lede {
    margin: 12px 0 0;
    max-width: none;
    color: var(--muted);
    font-size: 17px;
    text-align: left;
}

.contact-list {
    display: grid;
    gap: 18px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--muted);
    margin-top: 3px;
}

.contact-item p {
    margin: 0;
}

.site-footer {
    padding: 24px 0 40px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    margin-bottom: 12px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    transform: translateY(-1px);
}

.site-footer p {
    margin: 0 auto;
    max-width: none;
    text-align: center;
}

@media (max-width: 1024px) {
    .hero-grid,
    .two-column,
    .card-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px;
        background: var(--nav-bg);
        border: 1px solid var(--nav-border);
        border-radius: 16px;
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 0;
    }

    .hero,
    .page-intro,
    .page-section {
        padding: 32px 0;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-grid,
    .card-grid-2,
    .card-grid-3,
    .two-column {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        grid-template-areas:
            "photo"
            "meta"
            "bio";
    }

    .hero-photo-column {
        justify-content: center;
        width: 100%;
    }

    .hero-profile-meta {
        align-items: center;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }

    .hero-identity {
        justify-items: center;
        text-align: center;
    }

    .hero-contact-icons {
        justify-content: center;
    }

    .card,
    .project-link-card {
        padding: 22px;
    }

    .project-image-frame {
        max-width: 220px;
    }

    .project-media-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-photo-rect {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 8px;
        min-height: 340px;
    }

    .intro-paragraph {
        font-size: 19px;
        line-height: 1.75;
    }

    .hero-bio {
        padding-left: 0;
        border-left: 0;
    }

    .intro-text p {
        font-size: 17px;
        line-height: 1.64;
    }

    .button {
        width: 100%;
    }

    .update-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pdf-frame {
        min-height: 760px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
