@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

:root {
    --ink:          #161a33;
    --ink-soft:     #3b4060;
    --muted:        #6b7088;
    --accent:       #9b1b5a;   /* magenta ASAM */
    --accent-dark:  #7d1448;
    --accent-soft:  #f7eef3;
    --green:        #1f7a46;   /* vert ASAM */
    --green-soft:   #edf6f0;
    --bg:           #faf9f7;
    --surface:      #ffffff;
    --line:         #e7e4df;
    --radius:       14px;
    --shadow:       0 1px 2px rgba(22,26,51,0.04), 0 8px 24px rgba(22,26,51,0.06);
    --serif:        'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans:         'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; line-height: 1.25; }

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ─── HEADER ─── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 24px;
}

.brand { display: flex; flex-direction: column; line-height: 1.2; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

nav { margin-left: auto; }

.menu { list-style: none; display: flex; gap: 4px; }

.menu a {
    display: block;
    padding: 8px 12px;
    color: var(--ink-soft);
    font-size: 14.5px;
    font-weight: 500;
    position: relative;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: 2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.menu a:hover { color: var(--ink); text-decoration: none; }
.menu a:hover::after, .menu a.active::after { transform: scaleX(1); }
.menu a.active { color: var(--ink); }

.lang {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 16px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.lang a, .lang span { padding: 3px 9px; border-radius: 999px; line-height: 1.4; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--ink); text-decoration: none; }
.lang .on { background: var(--ink); color: #fff; }

.menu-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: 42px; height: 42px;
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
}

/* ─── HERO ─── */
.hero { padding: 72px 0 64px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.hero h1 { font-size: 54px; letter-spacing: -0.01em; margin-bottom: 18px; }

.lead { font-size: 18px; color: var(--ink-soft); max-width: 580px; margin-bottom: 22px; }

.affiliation {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 30px;
}
.affiliation i { color: var(--green); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.portrait {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 320px;
}

.portrait::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    opacity: 0.35;
}

.portrait img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--line);
}

/* ─── PROFILE LINKS ─── */
.profiles { display: flex; flex-wrap: wrap; gap: 10px; }

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 13.5px;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.profile-link i { font-size: 16px; }
.profile-link img { width: 16px; height: 16px; object-fit: contain; }
.profile-link:hover { text-decoration: none; transform: translateY(-1px); }
.profile-link.orcid:hover        { color: #6b8f1e; border-color: #a6ce39; }
.profile-link.researchgate:hover { color: #00a88f; border-color: #00ccbb; }
.profile-link.linkedin:hover     { color: #0a66c2; border-color: #0a66c2; }
.profile-link.github:hover       { color: #24292f; border-color: #24292f; }
.profile-link.asam:hover         { color: var(--accent); border-color: var(--accent); }

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ─── SECTIONS ─── */
.section { padding: 56px 0; border-top: 1px solid var(--line); }

.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: 32px; }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 640px; }

.page-head { padding: 64px 0 40px; }
.page-head h1 { font-size: 46px; margin-bottom: 12px; }
.page-head p { font-size: 17.5px; color: var(--muted); max-width: 680px; }

.prose p { margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.alma {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 10px 20px 10px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    transition: border-color 0.2s;
}
.alma:hover { text-decoration: none; color: var(--muted); border-color: var(--accent); }
.alma img { width: 52px; height: 52px; object-fit: contain; }
.alma strong { color: var(--ink); font-weight: 600; }

.two-col {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 48px;
    align-items: start;
}

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

.card h3 { font-size: 20px; margin-bottom: 8px; }

.facts { list-style: none; }
.facts li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}
.facts li:last-child { border-bottom: none; padding-bottom: 0; }
.facts li:first-child { padding-top: 0; }
.facts span { color: var(--muted); }
.facts strong { color: var(--ink); font-weight: 500; }

/* ─── RESEARCH INTERESTS ─── */
.interests {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.interest {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 10px;
    padding: 22px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.interest:nth-child(even) { border-top-color: var(--green); }
.interest:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.interest i { font-size: 20px; color: var(--ink); margin-bottom: 12px; display: block; }
.interest h3 { font-size: 17px; margin-bottom: 6px; }
.interest p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }


/* ─── GROUP (ASAM) ─── */
.group-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 40px;
    align-items: center;
}
.group-card .logo {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
}
.group-card .logo { display: flex; align-items: center; gap: 22px; }
.group-card .logo img { flex: 1; min-width: 0; height: auto; }
.group-card .logo .logo-unifr {
    flex: none;
    width: 96px;
    padding-left: 22px;
    border-left: 1px solid var(--line);
}
.group-card p { margin-bottom: 18px; }

/* ─── TEASERS ─── */
.teasers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.teaser {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    color: var(--ink-soft);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.teaser:hover { text-decoration: none; color: var(--ink-soft); border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.teaser i { font-size: 20px; color: var(--accent); margin-bottom: 14px; display: block; }
.teaser h3 { font-size: 19px; margin-bottom: 6px; }
.teaser p { font-size: 14.5px; color: var(--muted); }
.teaser .more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ─── TIMELINE (CV) ─── */
.block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    margin: 0 0 22px;
}
.block-title i { font-size: 18px; color: var(--accent); }
.block + .block { margin-top: 48px; }

.timeline { list-style: none; border-left: 2px solid var(--line); margin-left: 6px; }

.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
    content: "";
    position: absolute;
    left: -7px; top: 7px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
}
.timeline li.current::before { background: var(--accent); }

.timeline .date {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.timeline h3 { font-size: 19px; margin: 2px 0 2px; }
.timeline .org { font-size: 15px; color: var(--ink-soft); }
.timeline .desc { font-size: 14.5px; color: var(--muted); margin-top: 6px; }

.side .card + .card { margin-top: 20px; }
.side h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.side h3 i { font-size: 15px; color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    font-size: 13px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 500;
}
.tag.green { background: var(--green-soft); color: var(--green); }

.side .label { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
.side .label:first-of-type { margin-top: 0; }

.downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

/* ─── TEACHING / PROJECTS ─── */
.course-list { display: grid; gap: 20px; }

.course {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    align-items: start;
}
.course .icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 22px;
}
.course:nth-child(even) .icon { background: var(--green-soft); color: var(--green); }
.course h3 { font-size: 21px; margin-bottom: 4px; }
.course .meta { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.course p { font-size: 15px; }

.project-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}
.project-card .url { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.project-card p { font-size: 15px; margin-bottom: 14px; }

/* ─── EMPTY STATE ─── */
.empty {
    text-align: center;
    padding: 56px 28px;
    border: 1px dashed #d8d3cc;
    border-radius: var(--radius);
    background: var(--surface);
}
.empty i { font-size: 34px; color: var(--accent); opacity: 0.6; margin-bottom: 16px; }
.empty h3 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 520px; margin: 0 auto 20px; }
.empty .profiles { justify-content: center; }

/* ─── CONTACT ─── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item + .contact-item { margin-top: 22px; }
.contact-item .icon {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
}
.contact-item .k { font-size: 13px; color: var(--muted); }
.contact-item .v { color: var(--ink); font-weight: 500; }

.map {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    min-height: 100%;
}
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ─── FOOTER ─── */
footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 28px 0;
    font-size: 14px;
    color: var(--muted);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); font-size: 17px; }
.footer-links a:hover { color: var(--accent); }

/* ─── ANIMATION ─── */
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
.reveal { animation: rise 0.6s ease both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }

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

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .portrait { justify-self: start; max-width: 260px; order: -1; }
    .two-col { grid-template-columns: 1fr; gap: 36px; }
    .interests, .teasers { grid-template-columns: repeat(2, 1fr); }
    .group-card { grid-template-columns: 1fr; gap: 24px; }
    .group-card .logo { max-width: 340px; }
}

@media (max-width: 820px) {
    .menu-toggle { display: grid; place-items: center; order: 3; margin-left: 8px; }
    .lang { order: 2; margin-left: auto; }
    nav {
        display: none;
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        padding: 8px 16px 16px;
    }
    nav.open { display: block; }
    .menu { flex-direction: column; gap: 0; }
    .menu a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
    .menu a::after { display: none; }
    .menu a.active { color: var(--accent); }
}

@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .brand-sub { display: none; }
    .hero { padding: 40px 0 48px; }
    .hero h1 { font-size: 38px; }
    .lead { font-size: 16.5px; }
    .page-head { padding: 44px 0 28px; }
    .page-head h1 { font-size: 34px; }
    .section { padding: 44px 0; }
    .section-head h2 { font-size: 26px; }
    .interests, .teasers, .contact-grid { grid-template-columns: 1fr; }
    .card { padding: 22px; }
    .project-card { grid-template-columns: 1fr; }
    .course { grid-template-columns: 1fr; gap: 12px; }
    .facts li { grid-template-columns: 1fr; gap: 0; }
}
