/* ==========================================================
   Silvia Ragni – Personal Website
   Part 1
   ========================================================== */

:root {
    --primary: #1F6F8B;
    --primary-light: #2F83A3;
    --text: #2B2D42;
    --muted: #666666;
    --background: #FFFFFF;
    --max-width: 1100px;
    --reading-width: 760px;
}

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:"Inter",sans-serif;
    background:var(--background);
    color:var(--text);
    font-size:18px;
    line-height:1.8;
    font-weight:400;
}

/* ====================== */

.container{
    width:min(92%, var(--max-width));
    margin:auto;
}

.narrow{
    width:min(92%, var(--reading-width));
    margin:auto;
}

/* ====================== */

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

/* ====================== */

a{
    color:var(--primary);
    text-decoration:none;
    transition:.25s;
}

a:hover{
    color:var(--primary-light);
}

/* ====================== */

h1{
    font-size:3.7rem;
    font-weight:700;
    line-height:1.1;
    margin-bottom:.5rem;
}

h2{
    font-size:1.5rem;
    font-weight:500;
    color:var(--primary);
    margin-bottom:.5rem;
}

h3{
    font-size:1.6rem;
    font-weight:600;
    margin-bottom:2rem;
}

p{
    margin-bottom:1.4rem;
}

/* ==========================================================
   Header
   ========================================================== */

header{
    position:sticky;
    top:0;
    background:white;
    z-index:1000;
}

header .container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:28px 0;
}

.logo{
    font-size:1.3rem;
    font-weight:600;
    color:var(--text);
}

.logo:hover{
    color:var(--text);
}

nav{
    display:flex;
    gap:34px;
}

nav a{
    color:var(--muted);
    font-weight:500;
}

nav a.active{
    color:var(--primary);
}

nav a:hover{
    color:var(--primary);
}

/* ==========================================================
   Hero
   ========================================================== */

.hero{
    padding-top:70px;
    padding-bottom:120px;
}

.hero-grid{
    display:grid;
    grid-template-columns:1fr 420px;
    gap:70px;
    align-items:center;
}

.hero-text{
    max-width:520px;
}

.institution{
    color:var(--muted);
    font-size:1.05rem;
}

.hero-image img{
    border-radius:10px;
    object-fit:cover;
}

/* ==========================================================
   Sections & About Integrated Layout
   ========================================================== */

section{
    padding:90px 0;
}

#about {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Forza la vela (colonna da 420px) a sinistra e il testo a destra su PC */
#about .sailing-side-block {
    grid-column: 1;
    width: 100%;
}

#about .about-text-block {
    grid-column: 2;
}

#about p:last-child{
    margin-bottom:0;
}

.readmore{
    font-weight:600;
}

/* ==========================================================
   Research
   ========================================================== */

#research{
    padding-top:30px;
    padding-bottom:70px;
}

#research strong{
    font-weight:600;
}

.readmore{
    display:inline-block;
    margin-top:10px;
    font-size:0.95rem;
    letter-spacing:.02em;
}

.readmore:hover{
    transform:translateX(4px);
}

/* ==========================================================
   Sailing Side Image & Captions
   ========================================================== */

.sailing-side-block img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.sailing-side-block figure {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
}

.caption-sailing {
    margin-top: 25px;
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.8;
    display: block;
}

/* ==========================================================
   News + Contact
   ========================================================== */

.news-contact{
    padding-top:40px;
    padding-bottom:100px;
}

.two-columns{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:80px;
    align-items:start;
}

.news-contact ul{
    list-style:none;
    padding:0;
}

.news-contact li{
    margin-bottom:28px;
}

.news-contact strong{
    color:var(--primary);
}

.news-contact p{
    margin-bottom:0;
}

.contact-email{
    word-break:break-word;
}

/* ==========================================================
   Mountain picture
   ========================================================== */

.mountain{
    width:min(92%,1000px);
    margin:auto;
    padding-top:30px;
    padding-bottom:90px;
}

.mountain img{
    width:100%;
    border-radius:10px;
    object-fit:cover;
}

.caption{
    max-width:700px;
    margin:25px auto 0;
    text-align:center;
    font-size:.95rem;
    color:var(--muted);
    line-height:1.8;
}

/* ==========================================================
   Footer
   ========================================================== */

footer{
    padding:30px 0;
    text-align:center;
    font-size:.9rem;
    color:#888;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 900px){

    body{
        font-size:17px;
    }

    header .container{
        flex-direction:column;
        gap:20px;
        padding:24px 0;
    }

    nav{
        gap:24px;
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero{
        padding-top:40px;
        padding-bottom:80px;
    }

    .hero-grid{
        display:flex;
        flex-direction:column;
        gap:50px;
    }

    /* Gestione ordine su mobile: testo sopra (order 1), foto sotto (order 2) */
    #about .about-text-block {
        order: 1;
    }
    
    #about .sailing-side-block {
        order: 2;
        width: 100%;
        max-width: 500px;
        margin: auto;
    }

    .hero-text{
        max-width:100%;
        text-align:center;
    }

    .hero-image{
        max-width:500px;
        margin:auto;
    }

    .two-columns{
        grid-template-columns:1fr;
        gap:60px;
    }

    .mountain{
        width:94%;
    }
}

@media (max-width: 600px){

    h1{
        font-size:2.5rem;
    }

    h2{
        font-size:1.2rem;
    }

    h3{
        font-size:1.35rem;
    }

    section{
        padding:60px 0;
    }

    .hero{
        padding-top:20px;
    }

    .hero-image img{
        border-radius:8px;
    }

    .caption{
        font-size:.9rem;
        padding:0 10px;
    }
}

/* ==========================================================
   Small details
   ========================================================== */

::selection{
    background:rgba(31,111,139,.18);
}

.logo,
nav a,
.readmore{
    transition:all .25s ease;
}

.hero-image img,
.sailing-side-block img,
.mountain img{
    transition:transform .35s ease;
}

.hero-image img:hover,
.sailing-side-block img:hover,
.mountain img:hover{
    transform:scale(1.01);
}

strong{
    font-weight:600;
}

em{
    font-style:italic;
}

ul{
    margin-left:0;
}

li{
    line-height:1.8;
}

footer p{
    margin:0;
}

/* ==========================================================
   Publications
   ========================================================== */

#publications{
    margin-top:45px;
}

.publication{
    margin-bottom:40px;
}

.publication-title{
    font-weight:600;
    font-size:1.1rem;
}

.publication-authors{
    color:var(--muted);
    margin-top:6px;
}

.publication-journal{
    margin-top:8px;
    font-style:italic;
}

.publication-links{
    margin-top:10px;
}

.publication-links a{
    margin-right:18px;
}

/* ==========================================================
   CV
   ========================================================== */

.cv-item{
    display:grid;
    grid-template-columns:140px 1fr;
    gap:40px;
    margin-bottom:60px;
}

.cv-year{
    color:var(--primary);
    font-weight:600;
}

.cv-content p{
    margin-top:12px;
}

@media (max-width:700px){
    .cv-item{
        grid-template-columns:1fr;
        gap:10px;
        margin-bottom:45px;
    }
}

/* ===================================================== */

.conference-item{
    margin-bottom:40px;
}

.conference-item p{
    margin-bottom:8px;
}

.conference-item a{
    font-weight:500;
}

/* ==========================================================
   News
   ========================================================== */

.news-item{
    margin-bottom:28px;
}

.news-item:last-child{
    margin-bottom:0;
}

.news-item strong{
    color:var(--primary);
    font-weight:600;
}

/* --- STILE PUBBLICAZIONI "AL-FOLIO" (STILE YANNIK SCHULER) --- */

.publications-timeline {
    margin-top: 2rem;
    font-family: 'Inter', sans-serif;
}

.pub-row {
    display: flex;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1.5rem;
}

.pub-row:last-child {
    border-bottom: none;
}

.pub-year {
    width: 15%;
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    padding-top: 0.2rem;
}

.pub-list-container {
    width: 85%;
}

.pub-list {
    list-style-type: disc;
    padding-left: 1.2rem;
    margin: 0;
}

.pub-list li {
    margin-bottom: 1.5rem;
}

.pub-list li:last-child {
    margin-bottom: 0;
}

.pub-item {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.pub-title {
    font-weight: 600;
    color: #111;
}

.pub-authors {
    color: #555;
}

.pub-links {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.5rem;
}

.pub-btn {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

.pub-btn:hover {
    color: #111;
    border-color: #666;
    background-color: #f0f0f0;
}

.pub-abstract {
    margin-top: 0.8rem;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: #f7f7f7;
    border-left: 3px solid #666;
    border-radius: 0 4px 4px 0;
    color: #555;
    text-align: justify;
}

@media (max-width: 768px) {
    .pub-row {
        flex-direction: column;
    }
    .pub-year {
        width: 100%;
        margin-bottom: 1rem;
        font-size: 1.6rem;
        border-bottom: 2px solid #333;
        padding-bottom: 0.2rem;
    }
    .pub-list-container {
        width: 100%;
    }
}


/* Stile per la striscia panoramica su PC */
.kayak {
    padding: 60px 0; /* Mantiene lo spazio vuoto sopra e sotto */
    width: 100%;
}

.kayak img {
    width: 100%;
    height: 250px; /* Ridotto da 300px a 150px per un effetto "striscia" sottile */
    object-fit: cover; 
    object-position: center; 
    display: block;
}

/* Ripristiniamo l'aspetto normale su telefono */
@media (max-width: 900px) {
    .kayak {
        padding: 20px 0; /* Meno spazio verticale su mobile */
    }
    .kayak img {
        height: auto; /* Torna a mostrare l'intera foto su mobile */
    }
}

/* --- AGGIUNTE CONFERENCES MODIFICATE --- */

/* Foto a destra come nella Home (420px) */
/* Layout affiancato Header + Foto */
<section class="hero">
    <div class="container hero-grid">
        <div class="hero-text">
            <h1>Conferences</h1>
            <p>One of the things I really like of my job is travelling.</p>
            <p>Here you can find a list of my talks and of the recent or future conferences I am attending.</p>
        </div>
        <div class="hero-image">
            <img src="TUA_IMMAGINE.jpg" alt="Conferences">
            <p class="caption">Kozhikode, India, 2026</p>
        </div>
    </div>
</section>
.caption { font-size: 0.85em !important; color: #666 !important; margin-top: 10px !important; font-style: italic !important; }

/* Striscia mare centrata sul volto (altezza 250px) */
.sea-strip {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    padding: 60px 0 !important;
    overflow: hidden !important;
}
.sea-strip img {
    width: 100% !important;
    height: 250px !important; /* Altezza aggiornata a 250px */
    object-fit: cover !important; 
    object-position: 60% 40% !important; /* Regola il 30% per il centraggio verticale */
}
