* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg: #f8f4f0;
    --bg-card: #DDE6D8;
    --primary: #015a2a;
    --primary-dark: #013f1d;
    --primary-light: #d0e0c8;
    --secondary: #c7b7a3;
    --accent: #015a2a;
    --text: #2d4a2d;
    --text-light: #3d6b3d;
    --border: #c5d5bd;
    --shadow: 0 8px 24px rgba(0,0,0,0.06);
    --radius: 20px;
    --font: 'Inter', sans-serif;
    --font-display: 'Fraunces', serif;
}
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 2rem 1.5rem;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    overflow: hidden;
}

.hero {
    position: relative;
    margin: -2.5rem -2rem 3rem;
    padding: 4.5rem 2rem 3.5rem;
    background: radial-gradient(120% 140% at 15% 0%, #0a7238 0%, var(--primary) 45%, var(--primary-dark) 100%);
    color: #f4f7f2;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    text-align: center;
    isolation: isolate;
}
.hero-graph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
}
.hero-graph line {
    stroke: #ffffff;
    stroke-opacity: 0.14;
    stroke-width: 1;
}
.hero-graph circle {
    fill: #cfe8bd;
    opacity: 0.55;
}
.hero-graph circle.pulse {
    animation: nodePulse 4.5s ease-in-out infinite;
}
.hero-graph circle.pulse:nth-of-type(2) { animation-delay: 1.1s; }
.hero-graph circle.pulse:nth-of-type(3) { animation-delay: 2.3s; }
@keyframes nodePulse {
    0%, 100% { opacity: 0.45; r: 3; }
    50% { opacity: 0.95; r: 5; }
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-block;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #cfe8bd;
    margin-bottom: 1.1rem;
}
.hero h1 {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.05;
    color: #ffffff;
}
.hero h2 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    font-weight: 400;
    color: #d7ecc9;
    margin-top: 0.5rem;
}
.hero .dates {
    margin-top: 1.6rem;
    font-family: var(--font);
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: #f4f7f2;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(2px);
    display: inline-block;
    padding: 0.4rem 1.6rem;
    border-radius: 40px;
    font-weight: 500;
}
.hero .organizers {
    margin-top: 1.6rem;
    font-size: 0.95rem;
    color: #d7ecc9;
}
.hero .organizers strong {
    font-weight: 600;
    color: #ffffff;
}

/* Sezioni */
section {
    margin-bottom: 3.5rem;
}
.section-title {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.8rem;
    border-left: 6px solid var(--accent);
    padding-left: 1rem;
}

/* Griglia relatori */
.speakers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.speakers-grid .speaker-card--solo {
    grid-column: 2 / 3;
}

.speaker-card {
    background: #ecf3e8;
    border-radius: 16px;
    padding: 1.5rem 1.2rem 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.speaker-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(1, 90, 42, 0.12);
}
.speaker-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    background: #c5d5bd;
    margin-bottom: 0.8rem;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.speaker-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.15rem;
}
.speaker-card .affiliation {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
    font-weight: 400;
}

.speaker-card details {
    width: 100%;
    margin-top: 0.3rem;
}
.speaker-card details summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 1rem;
    border-radius: 30px;
    display: inline-block;
    transition: background 0.2s;
    border: none;
    outline: none;
    list-style: none;
}
.speaker-card details summary::-webkit-details-marker {
    display: none;
}
.speaker-card details summary:hover {
    background: #bcd0b2;
}
.speaker-card details .bio {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--text);
    text-align: left;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.speaker-card details .bio p {
    margin-bottom: 0.5rem;
}
.bio-en, .bio-zh {
    margin-bottom: 0.8rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.4);
}
.bio-en p, .bio-zh p {
    margin-bottom: 0;
}
.bio-en strong, .bio-zh strong {
    color: var(--primary);
    font-weight: 600;
}
.bio-zh {
    border-top: 1px dashed var(--border);
    padding-top: 0.8rem;
    margin-top: 0.3rem;
}
.speaker-card .online-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.8rem;
    border-radius: 30px;
    margin-top: 0.3rem;
    letter-spacing: 0.3px;
}

/* Tabella programma */
.program-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}
.program-table th {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 0.8rem 0.6rem;
    text-align: left;
    border-bottom: 2px solid var(--border);
}
.program-table th:first-child {
    border-top-left-radius: 12px;
}
.program-table th:last-child {
    border-top-right-radius: 12px;
}
.program-table td {
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.program-table tr:last-child td {
    border-bottom: none;
}
.program-table .time {
    white-space: nowrap;
    font-weight: 500;
    color: var(--primary);
    width: 9%;
}
.program-table .title {
    width: 43%;
}
.program-table .speaker {
    width: 28%;
    color: var(--text-light);
}

.program-table .day,
.program-table .day-spacer {
    width: 9%;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid var(--border);
}
.program-table .day {
    padding: 0.9rem 0.4rem;
}
.date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    margin: 0 auto;
    width: 56px;
    padding: 0.55rem 0.3rem 0.45rem;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(1, 90, 42, 0.22);
}
.date-badge .date-num {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
}
.date-badge .date-month {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #cfe8bd;
    margin-top: 0.15rem;
}

tr.day-group-a > td.time,
tr.day-group-a > td.title,
tr.day-group-a > td.speaker,
tr.day-group-a > td.abstract-cell {
    background: #eef4e9;
}
tr.day-group-a > td.day,
tr.day-group-a > td.day-spacer {
    background: #cfe0c3;
}
tr.day-group-b > td.time,
tr.day-group-b > td.title,
tr.day-group-b > td.speaker,
tr.day-group-b > td.abstract-cell {
    background: #f8faf6;
}
tr.day-group-b > td.day,
tr.day-group-b > td.day-spacer {
    background: #e4ecdf;
}

tr.abstract-row.day-group-a > td.abstract-cell {
    background: #e2ecd9;
}
tr.abstract-row.day-group-b > td.abstract-cell {
    background: #eef3e9;
}

.plain-title {
    display: inline-block;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.abstract-toggle {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
    position: relative;
    padding-right: 1.3rem;
}
.abstract-toggle:hover {
    color: var(--primary);
    text-decoration: underline;
}
.abstract-toggle::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}
.abstract-toggle[aria-expanded="true"]::after {
    content: "\2212"; /* minus sign */
    background: var(--primary);
    color: #fff;
}


.abstract-row {
    display: none;
}
.abstract-row.open {
    display: table-row;
}
.abstract-row td {
    border-bottom: 1px solid var(--border);
}
.abstract-content {
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    animation: fadeIn 0.25s ease;
}
.abstract-content strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.ul-bold {
    font-weight: 600;
}

.abstract-content p {
    margin-bottom: 0.6rem;
}
.abstract-content p:last-child {
    margin-bottom: 0;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.program-hint {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

@media (max-width: 1000px) {
    .speakers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .speakers-grid .speaker-card--solo {
        grid-column: auto;
    }
}

/* Responsive */
@media (max-width: 700px) {
    body { padding: 1rem 0.5rem; }
    .container { padding: 1.5rem 1rem; }
    .hero {
        margin: -1.5rem -1rem 2.2rem;
        padding: 3rem 1.2rem 2.4rem;
    }
    header h1 { font-size: 2rem; }
    .section-title { font-size: 1.5rem; }
    .bio-en, .bio-zh {
        padding: 0.3rem 0.4rem;
        font-size: 0.85rem;
    }
    .abstract-content { font-size: 0.82rem; }
}

@media (max-width: 650px) {
    .speakers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .program-table { font-size: 0.85rem; }
    .program-table thead { display: none; }
    .program-table, .program-table tbody, .program-table td {
        display: block;
        width: 100%;
    }

    .program-table tbody tr:not(.abstract-row) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.7rem 0.85rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        margin-bottom: 0.6rem;
    }
    .program-table tbody tr.day-group-a:not(.abstract-row) {
        background: #eef4e9;
    }
    .program-table tbody tr.day-group-b:not(.abstract-row) {
        background: #f8faf6;
    }

    .program-table tbody tr.abstract-row.open {
        display: flex;
        flex-wrap: wrap;
        padding: 0 0.85rem 0.75rem;
        margin-top: -1px;
        margin-bottom: 0.6rem;
        border: 1px solid var(--border);
        border-top: none;
        border-radius: 0 0 10px 10px;
    }
    .program-table tbody tr.abstract-row.day-group-a.open {
        background: #e2ecd9;
    }
    .program-table tbody tr.abstract-row.day-group-b.open {
        background: #eef3e9;
    }

    .program-table tbody tr:not(.abstract-row):has(+ tr.abstract-row.open) {
        margin-bottom: 0;
    }

    .program-table td {
        padding: 0;
        border-bottom: none;
        background: transparent !important;
    }

    .program-table .day,
    .program-table .day-spacer {
        border-right: none;
        width: 100%;
    }
    .program-table .day {
        order: 1;
        flex: 1 1 100%;
        margin: 0 0 0.6rem 0;
        padding: 0;
    }
    .program-table .day-spacer {
        display: none;
    }
    .date-badge {
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 0.4rem;
        width: 100%;
        padding: 0.45rem 0.8rem;
        margin: 0;
        border-radius: 8px;
    }
    .date-badge .date-num { font-size: 1.1rem; }
    .date-badge .date-month { font-size: 0.65rem; margin-top: 0; }

    .program-table .time {
        order: 2;
        flex: 1 1 100%;
        width: 100%;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

    .program-table .title {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
    }
    .program-table .abstract-toggle,
    .program-table .plain-title {
        display: block;
        width: 100%;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
        font-size: 0.9rem;
        white-space: normal;
    }
    .program-table .speaker {
        order: 4;
        flex: 1 1 100%;
        width: 100%;
        margin-top: 0;
        font-size: 0.82rem;
    }
    .program-table .abstract-cell {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
    }
    .abstract-content { padding: 0.7rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-graph circle.pulse { animation: none; }
    .spots-dot { animation: none; }
}

/* Footer */
footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}
footer a {
    color: var(--primary);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* Registration */
.registration-box {
    background: #ecf3e8;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.spots-badge {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 0.5rem 1.3rem;
    border-radius: 40px;
    margin: 1.4rem auto 0;
    box-shadow: 0 3px 10px rgba(1, 90, 42, 0.08);
}
.spots-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2fae5c;
    flex-shrink: 0;
    animation: spotsPulse 1.8s infinite;
}
@keyframes spotsPulse {
    0% { box-shadow: 0 0 0 0 rgba(47, 174, 92, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(47, 174, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 174, 92, 0); }
}
.spots-text {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.spots-count {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
}

.registration-box p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.deadline {
    margin-top: 1.5rem;
}

.deadline p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 0.5rem;
    font-weight: 500;
}

.deadline .registration-small {
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 0;
}

.register-btn {
    display: inline-block;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: var(--primary);
    padding: 0.8rem 2.4rem;
    border-radius: 40px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(1, 90, 42, 0.2);
}
.register-btn:hover {
    background: #013f1d;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(1, 90, 42, 0.28);
}
.register-btn:active {
    transform: translateY(0);
}
