:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-alt: #eef2f7;
    --surface-strong: #e7edf6;
    --text: #111827;
    --muted: #4b5563;
    --muted-strong: #374151;
    --border: #dbe0ea;
    --accent: #1d4ed8;
    --accent-strong: #1e3a8a;
    --max: 1120px;
    --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(29,78,216,.07), transparent 30rem),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
}
a { color: var(--accent); }
.icon {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: text-bottom;
    color: currentColor;
}
.icon-sm { width: 1.125rem; height: 1.125rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-box {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--accent-strong);
}
.card-icon { width: 1.25rem; height: 1.25rem; }
.button-icon { width: 1.1rem; height: 1.1rem; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; border-radius: 8px; }
main, .header-content, .footer-content { width: min(var(--max), 92vw); margin: 0 auto; }
.site-header { background: rgba(255,255,255,.86); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.header-content { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .85rem 0; }
.site-title { font-weight: 750; letter-spacing: -.02em; color: var(--text); text-decoration: none; white-space: nowrap; }
.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .28rem; }
.main-nav a, .lang-link { text-decoration: none; color: var(--muted); padding: .42rem .68rem; border-radius: 999px; font-size: .94rem; }
.main-nav a:hover, .lang-link:hover, .lang-link.active { background: var(--surface-alt); color: var(--text); }
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: .36rem;
    padding: .18rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    white-space: nowrap;
}
.language-switcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    color: var(--accent-strong);
    background: var(--surface-alt);
}
.language-options {
    display: inline-flex;
    align-items: center;
    gap: .1rem;
}
.language-switcher .lang-link {
    padding: .28rem .52rem;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .025em;
}
.language-switcher .lang-link.active {
    background: var(--text);
    color: #fff;
}
.language-switcher .lang-link:hover:not(.active) {
    background: var(--surface-alt);
    color: var(--text);
}
.hero { padding: 5.8rem 0 3.2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 2.2rem; align-items: center; }
.hero-copy { align-self: center; }
h1 { font-size: clamp(2.35rem, 7vw, 4.75rem); line-height: .98; letter-spacing: -.06em; margin: 0; max-width: 10ch; }
.eyebrow { color: var(--accent-strong); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; margin: 0 0 .45rem; }
.subtitle { font-size: clamp(1.18rem, 2.6vw, 1.55rem); color: var(--muted-strong); max-width: 620px; margin: 1rem 0 .7rem; line-height: 1.35; }
.hero-text { max-width: 620px; color: var(--muted); font-size: 1.02rem; }
.hero-context { display: grid; gap: .2rem; color: var(--muted-strong); font-weight: 650; }
.inline-link { color: var(--text); text-decoration-color: rgba(29,78,216,.35); text-underline-offset: .18em; }
.inline-link:hover { color: var(--accent-strong); }
.hero-photo-card {
    width: min(100%, 390px);
    justify-self: end;
    padding: .75rem;
}
.profile-photo-shell {
    padding: .42rem;
    border: 1px solid rgba(29, 78, 216, .18);
    border-radius: calc(var(--radius) + 8px);
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(231,237,246,.78)),
        var(--surface);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 18px 45px rgba(15,23,42,.08);
}
.profile-photo-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid rgba(17, 24, 39, .18);
    border-radius: calc(var(--radius) + 4px);
    background: #111827;
}
.profile-photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -3rem 5rem rgba(15,23,42,.2);
}
.profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .72rem; margin-top: 1.35rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; padding: .72rem 1rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; font-weight: 700; transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-secondary, .btn-tertiary { background: rgba(255,255,255,.78); color: var(--text); }
.btn-secondary:hover, .btn-tertiary:hover { background: var(--surface); border-color: #c8d0dd; }
.section { padding: 2.7rem 0; }
.section-narrow { max-width: 850px; }
.section-muted { border-top: 1px solid var(--border); }
.section-heading { margin-bottom: 1.05rem; }
.split-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
h2 { font-size: clamp(1.45rem, 3vw, 2.25rem); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 .85rem; }
.section-intro { max-width: 760px; color: var(--muted); }
.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.focus-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
    background: rgba(255,255,255,.88);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    box-shadow: 0 18px 45px rgba(15,23,42,.03);
}
.card h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .55rem; line-height: 1.25; }
.card p { margin-top: .35rem; }
.focus-card { min-height: 100%; }
.focus-card h3 { display: block; margin-top: .85rem; }
.meta { color: var(--muted); font-size: .95rem; }
.meta .icon { margin-right: .3rem; }
.text-link { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.timeline-item h3 a { color: var(--text); text-decoration: none; }
.timeline-item h3 a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: .18em; }
.link-card a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; }
.link-card a:hover { text-decoration: underline; }
.project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-card { display: flex; flex-direction: column; gap: .55rem; }
.project-card .project-type {
    width: fit-content;
    margin: 0;
    padding: .22rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.68);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.project-card h3 { margin: 0; }
.project-card p { margin: 0; color: var(--muted); }
.project-card a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: auto;
    font-weight: 700;
    text-decoration: none;
}
.project-card a:hover { text-decoration: underline; }
.timeline { border-left: 2px solid var(--border); margin-left: .5rem; padding-left: 1.15rem; display: grid; gap: 1rem; }
.timeline-item { position: relative; background: rgba(255,255,255,.72); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.timeline-item::before { content: ""; width: .72rem; height: .72rem; border-radius: 50%; background: var(--accent); position: absolute; left: -1.56rem; top: 1.38rem; box-shadow: 0 0 0 4px var(--bg); }
.timeline-period { color: var(--accent-strong); font-weight: 800; font-size: .82rem; margin: 0 0 .35rem; letter-spacing: .03em; }
.timeline-item h3 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .25rem; }
.timeline-item h3 .company-logo {
    display: inline-block !important;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    min-width: 22px !important;
    flex: 0 0 22px !important;
    object-fit: contain;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid rgba(219, 224, 234, .8);
    background: rgba(255,255,255,.7);
    opacity: .58;
    filter: grayscale(1);
}
.timeline-item:hover h3 .company-logo {
    opacity: .82;
    filter: grayscale(.35);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 2.05rem;
    padding: .34rem .75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: var(--muted-strong);
    font-weight: 650;
    font-size: .94rem;
}
.education-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.publication-card { grid-column: 1 / -1; }
.publication-card .eyebrow { margin-bottom: .55rem; }
.publication-card h3 { margin-bottom: .35rem; }
.publication-card .text-link { margin-top: .4rem; }
.links-grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-cta { border-top: 1px solid var(--border); margin-top: .6rem; padding-top: 2.8rem; padding-bottom: 3.2rem; }
.site-footer { margin-top: 2rem; border-top: 1px solid var(--border); background: rgba(255,255,255,.8); }
.footer-content { padding: 1.5rem 0; display: grid; gap: .7rem; }
.footer-links, .footer-languages { display: flex; flex-wrap: wrap; gap: .8rem; }
.footer-links a, .footer-languages a { text-decoration: none; font-weight: 650; }
.footer-links a:hover, .footer-languages a:hover { text-decoration: underline; }
@media (max-width: 1100px) {
    .focus-grid, .links-grid-cards, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .grid-cards, .education-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-photo-card { justify-self: start; }
    h1 { max-width: 13ch; }
    .split-heading { align-items: start; flex-direction: column; }
    .profile-photo-frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 760px) {
    main, .header-content, .footer-content { width: min(var(--max), 90vw); }
    .header-content { flex-wrap: wrap; align-items: flex-start; }
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .15rem;
    }
    .main-nav a { flex: 0 0 auto; }
    .language-switcher { order: 2; margin-left: auto; }
    .grid-cards, .focus-grid, .links-grid-cards, .education-grid, .project-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 3.8rem; }
    .hero-cta .btn { width: 100%; }
    .timeline { margin-left: .2rem; padding-left: .85rem; }
    .timeline-item::before { left: -1.28rem; }
    .timeline-item h3 .company-logo { width: 20px !important; height: 20px !important; max-width: 20px !important; max-height: 20px !important; min-width: 20px !important; flex-basis: 20px !important; padding: 2px; }
    .profile-photo-frame { aspect-ratio: 4 / 3; }
}
@media (max-width: 430px) {
    .language-switcher { width: 100%; justify-content: flex-start; }
    .language-options { flex: 1; justify-content: space-between; }
}