/* ============================================================
   Dorian Joubaud — personal site
   Light academic theme, inspired by charles.doffy.net,
   with the teal accent retained from the prior design.
   ============================================================ */

:root {
    --color-bg:        #fbfbf9;
    --color-surface:   #ffffff;
    --color-rule:      #ececea;
    --color-text:      #1f2222;
    --color-muted:     #6a6f72;
    --color-faint:     #8a8f92;
    --color-accent:    #11ABB0;
    --color-accent-dk: #0d8589;
    --color-link:      #11ABB0;
    --color-link-hov:  #0d8589;
    --color-chip-bg:   #f1f2f0;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
                 Monaco, Consolas, monospace;

    --content-max: 760px;
    --gutter: 1.5rem;
    --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
}
a:hover {
    color: var(--color-link-hov);
    border-bottom-color: var(--color-link-hov);
}

hr {
    border: 0;
    border-top: 1px solid var(--color-rule);
    margin: 3rem 0;
}

/* ---------- Layout ---------- */

.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Top nav ---------- */

.topnav {
    position: sticky;
    top: 0;
    background: rgba(251, 251, 249, 0.9);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--color-rule);
    z-index: 50;
}
.topnav__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.75rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.topnav__brand {
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.topnav__brand:hover { border-bottom-color: transparent; color: var(--color-accent); }
.topnav__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.topnav__links a {
    color: var(--color-muted);
    font-size: 0.95rem;
}
.topnav__links a:hover { color: var(--color-accent); border-bottom-color: transparent; }

/* ---------- Hero / about ---------- */

.hero {
    padding: 3.5rem 0 1rem;
}
.hero__row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.hero__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-rule);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    flex-shrink: 0;
}
.hero__text { flex: 1 1 320px; min-width: 0; }
.hero__name {
    margin: 0 0 0.25rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.hero__role {
    margin: 0 0 0.5rem;
    color: var(--color-muted);
    font-size: 1.05rem;
    font-weight: 500;
}
.hero__affil {
    margin: 0 0 0.75rem;
    color: var(--color-faint);
    font-size: 0.95rem;
}
.hero__location {
    margin: 0 0 1rem;
    color: var(--color-faint);
    font-size: 0.9rem;
}
.hero__location::before {
    content: "📍 ";
    font-size: 0.95em;
}

.socials {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-chip-bg);
    color: var(--color-muted);
    border-bottom: none;
    transition: background .15s, color .15s, transform .15s;
}
.socials a:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-1px);
}
.socials i { font-size: 1rem; }

/* ---------- Sections ---------- */

.section {
    padding: 2.5rem 0;
}
.section__title {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-faint);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-rule);
}

.prose p {
    margin: 0 0 1rem;
}
.prose p:last-child { margin-bottom: 0; }

/* ---------- News ---------- */

.news {
    list-style: none;
    margin: 0;
    padding: 0;
}
.news li {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--color-rule);
}
.news li:last-child { border-bottom: 0; }
.news__date {
    color: var(--color-faint);
    font-variant-numeric: tabular-nums;
    font-size: 0.88rem;
    padding-top: 0.05rem;
}
.news__text { color: var(--color-text); }
.news__more {
    margin-top: 0.75rem;
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-muted);
    cursor: pointer;
}
.news--collapsed .news__hidden { display: none; }

/* ---------- Publication entries ---------- */

.pub {
    padding: 1rem 0 1.25rem;
    border-bottom: 1px solid var(--color-rule);
}
.pub:last-child { border-bottom: 0; }
.pub__title {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}
.pub__title a { color: var(--color-text); border-bottom: none; }
.pub__title a:hover { color: var(--color-accent); }
.pub__meta {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}
.pub__venue { font-style: italic; }
.pub__year::before { content: " · "; color: var(--color-faint); }
.pub__authors {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    color: var(--color-muted);
}
.pub__authors .me { color: var(--color-text); font-weight: 500; }
.pub__desc {
    margin: 0.4rem 0 0.65rem;
    font-size: 0.96rem;
    color: var(--color-text);
}
.pub__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--color-chip-bg);
    color: var(--color-muted);
    font-size: 0.82rem;
    border-bottom: none;
    transition: background .15s, color .15s;
}
.chip:hover {
    background: var(--color-accent);
    color: #fff;
    border-bottom: none;
}
.chip i { font-size: 0.85rem; }

.tag {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.08rem 0.45rem;
    border-radius: 4px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    vertical-align: 0.1em;
    text-transform: uppercase;
}
.tag--review { background: #c98a14; }
.tag--prep   { background: #6a6f72; }

/* ---------- Generic list entries (talks, teaching, education, software) ---------- */

.entry {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.85rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--color-rule);
    align-items: baseline;
}
.entry:last-child { border-bottom: 0; }
.entry__when {
    color: var(--color-faint);
    font-variant-numeric: tabular-nums;
    font-size: 0.88rem;
}
.entry__main { color: var(--color-text); }
.entry__title { font-weight: 500; }
.entry__sub {
    display: block;
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

/* ---------- Software cards ---------- */

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}
.repo {
    border: 1px solid var(--color-rule);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    background: var(--color-surface);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.repo:hover {
    border-color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(17, 171, 176, 0.08);
}
.repo a {
    display: block;
    color: inherit;
    border-bottom: none;
}
.repo__name {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.repo__desc {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.45;
}

/* ---------- Footer ---------- */

.site-footer {
    padding: 2rem 0 3rem;
    color: var(--color-faint);
    font-size: 0.85rem;
    text-align: center;
    border-top: 1px solid var(--color-rule);
    margin-top: 2rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero { padding-top: 2rem; }
    .hero__row { gap: 1.25rem; }
    .hero__photo { width: 130px; height: 130px; }
    .hero__name { font-size: 1.6rem; }
    .news li, .entry {
        grid-template-columns: 4.5rem 1fr;
        gap: 0.5rem;
    }
    .topnav__links { gap: 0.85rem; font-size: 0.85rem; }
    .topnav__brand { display: none; }
}

/* Print: keep clean */
@media print {
    .topnav, .site-footer { display: none; }
    a { color: inherit; border-bottom: none; }
}
