/* ===========================================================
   Samuel Delpeuch - stylesheet 2026
   Titles: Peignot (after A.M. Cassandre, Deberny & Peignot, 1937)
   Text:   EB Garamond (a Garamond revival - Deberny & Peignot
           also cut its own "Garamont" in the 1910s-20s)
   =========================================================== */

@font-face {
    font-family: "Peignot";
    src: url("Fonts/Peignot.ttf") format("truetype");
    font-display: swap;
}

:root {
    --ink: #1c1c1c;        /* main text */
    --muted: #6b6b6b;      /* secondary text (dates, journals) */
    --accent: #8a2c1d;     /* links, small details (old printer's red) */
    --line: #dbe2d6;       /* thin separators */
    --paper: #f3f6f0;      /* page background (very pale sage) */
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px 40px 24px;
    background: var(--paper);
    color: var(--ink);
    font-family: "EB Garamond", Garamond, Georgia, serif;
    font-size: 19px;
    line-height: 1.55;
}

/* ---------- Header: name + menu ---------- */

#header {
    padding: 48px 0 8px 0;
}

#sitename {
    font-family: "Peignot", "Futura", sans-serif;
    font-size: 46px;
    font-weight: normal;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-decoration: none;
    margin: 0;
    line-height: 1.1;
}

#subtitle {
    margin: 6px 0 0 0;
    color: var(--muted);
    font-size: 17px;
    font-style: italic;
}

#tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    margin: 28px 0 40px 0;
    padding: 12px 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--line);
}

#tabs a {
    font-family: "Peignot", "Futura", sans-serif;
    font-size: 18px;
    color: var(--ink);
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 2px solid transparent;
}

#tabs a:hover { border-bottom-color: var(--line); }
#tabs a.active { border-bottom-color: var(--accent); }

/* ---------- Content ---------- */

#content { padding: 0; }

h2 {
    font-family: "Peignot", "Futura", sans-serif;
    font-weight: normal;
    font-size: 28px;
    margin: 56px 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

h2:first-child { margin-top: 0; }

h3 {
    font-family: "Peignot", "Futura", sans-serif;
    font-weight: normal;
    font-size: 21px;
    margin: 40px 0 8px 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover { text-decoration: underline; }

p { margin: 0 0 12px 0; }

.muted, small { color: var(--muted); }

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 40px 0;
}

ul { padding-left: 20px; }
li { margin-bottom: 4px; }

/* ---------- Papers (research page) ----------
   One <div class="paper"> per paper:
   text on the left, figure on the right.
   On a phone the figure goes under the text. */

.paper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.paper:last-child { border-bottom: none; }

.paper-text { flex: 1 1 62%; min-width: 0; }

.paper-fig {
    flex: 0 0 34%;
    margin: 6px 0 0 0;
}

.paper-fig img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    background: #fff;
}

.paper-fig figcaption {
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.35;
}

.paper-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.paper-title a { color: var(--ink); }
.paper-title a:hover { color: var(--accent); }

.paper-venue {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 4px;
}

.abstract {
    text-align: justify;
    hyphens: auto;
    font-size: 17px;
}

.links a { margin-right: 14px; }

.tag {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0 6px;
    margin-bottom: 8px;
}

/* ---------- Tables (teaching page) ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 17px;
}

th, td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    font-family: "Peignot", "Futura", sans-serif;
    font-weight: normal;
}

/* ---------- Photo gallery (misc page) ---------- */

.chapter-number {
    font-family: "Peignot", "Futura", sans-serif;
    color: var(--accent);
    font-size: 16px;
    letter-spacing: 0.05em;
    margin: 40px 0 0 0;
}

.chapter-number + h3 { margin-top: 2px; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.placeholder {
    border: 1px dashed var(--line);
    color: var(--muted);
    font-style: italic;
    padding: 24px;
    text-align: center;
}

/* Slider (banya) - same classes as before */
.custom-slider { display: none; position: relative; }
.slide-container { max-width: 920px; position: relative; margin: 16px auto 0 auto; }
.slide-img { width: 100%; height: 420px; object-fit: cover; display: block; }
/* Renovation chapters: a bit taller, and portrait photos shown whole */
.slide-container.tall .slide-img { height: 540px; object-fit: contain; background: var(--ink); }
.slide-img.portrait { object-fit: contain; background: var(--ink); }
.slide-text {
    position: absolute; bottom: 0; width: 100%;
    padding: 28px 16px 14px 16px;
    color: #fff; text-align: center; font-size: 17px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}
.slide-index { position: absolute; top: 0; padding: 12px; color: #fff; font-size: 13px; }
.prev, .next {
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #fff; font-size: 24px; user-select: none;
    background-color: rgba(0,0,0,0.25); text-decoration: none;
}
.prev { left: 12px; }
.next { right: 12px; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.55); text-decoration: none; }
.slide-dot { text-align: center; margin-top: 10px; }
.dot {
    cursor: pointer; height: 9px; width: 9px; margin: 0 3px;
    background-color: #c3cbbd; border-radius: 50%; display: inline-block;
}
.dot.active, .dot:hover { background-color: var(--ink); }
.fade { animation: fade 0.8s; }
@keyframes fade { from { opacity: 0.3 } to { opacity: 1 } }

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

footer {
    margin-top: 64px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--muted);
}

footer p { margin-bottom: 4px; }

/* ---------- Smartphones ---------- */

@media (max-width: 700px) {
    body { font-size: 17px; padding: 0 16px 32px 16px; }
    #header { padding-top: 28px; }
    #sitename { font-size: 34px; }
    #tabs { gap: 4px 18px; margin: 20px 0 28px 0; }
    #tabs a { font-size: 16px; }
    h2 { font-size: 24px; margin-top: 40px; }
    .paper { flex-direction: column; gap: 14px; }
    .paper-fig { flex-basis: auto; width: 100%; }
    .paper-title { font-size: 19px; }
    .abstract { font-size: 16px; text-align: left; }
    .slide-img { height: 260px; }
    .slide-container.tall .slide-img { height: 340px; }
    table { font-size: 15px; }
    th, td { padding-right: 8px; }
}

/* section titles that are links stay dark */
h2 a, h3 a { color: var(--ink); }
h2 a:hover, h3 a:hover { color: var(--accent); text-decoration: none; }
