:root {
    color-scheme: light;
    --primary-color: #873b1e;
    --secondary-color: #bc5128;
    --accent-color: #f0a044;
    --bg-light: #fff8ef;
    --highlight-color: #fff0dc;
    --text-color: #363331;
    --muted-color: #756b64;
    --border-color: #eedcc9;
    --surface: #fffefa;
    --shadow: 0 18px 50px rgba(112, 54, 25, 0.09);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 90% 0%, rgba(240, 160, 68, 0.13), transparent 34rem),
        var(--bg-light);
    color: var(--text-color);
    font-family: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--secondary-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

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

a:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 3px;
}

header {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 7vw, 6rem) 1.5rem 0;
    color: #fffefa;
    text-align: center;
    background:
        radial-gradient(ellipse at 15% 5%, rgba(255, 190, 109, 0.23), transparent 35rem),
        linear-gradient(125deg, #71331e 0%, #a74724 58%, #ca642e 100%);
}

header::after {
    position: absolute;
    right: -6rem;
    bottom: 3.5rem;
    width: 21rem;
    height: 21rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

header h1 {
    position: relative;
    z-index: 1;
    max-width: 1050px;
    margin: 0 auto 0.8rem;
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 720;
    letter-spacing: -0.045em;
    line-height: 1.12;
    text-wrap: balance;
}

header p {
    position: relative;
    z-index: 1;
    max-width: 850px;
    margin: 0 auto 0.45rem;
    color: rgba(255, 254, 250, 0.82);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
}

header p strong {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fffefa;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.93rem;
    letter-spacing: 0.02em;
}

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid rgba(229, 222, 210, 0.8);
    background: rgba(255, 254, 250, 0.94);
    box-shadow: 0 8px 24px rgba(112, 54, 25, 0.07);
    backdrop-filter: blur(14px);
}

nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: #68584d;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

nav a:hover,
nav a.active {
    color: #fffefa;
    background: var(--primary-color);
}

.container {
    width: min(100% - 2.5rem, 1080px);
    flex: 1;
    margin: clamp(1.5rem, 4vw, 3rem) auto;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border: 1px solid rgba(229, 222, 210, 0.75);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

h2 {
    position: relative;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.65rem;
    color: var(--primary-color);
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 720;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

h2:first-child,
.announcements h2 {
    margin-top: 0;
}

h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    border-radius: 99px;
    background: var(--accent-color);
    content: "";
}

h3 {
    margin: 1.7rem 0 0.55rem;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

p {
    margin-bottom: 1rem;
}

ul,
ol {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
}

li {
    margin-bottom: 0.45rem;
    padding-left: 0.15rem;
}

li::marker {
    color: var(--accent-color);
}

strong {
    color: var(--primary-color);
}

table {
    width: 100%;
    margin: 1.4rem 0 1.8rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fffefa;
    font-size: 0.95rem;
}

th,
td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--primary-color);
    background: #fff1df;
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:nth-child(even) td {
    background: #fcfaf6;
}

footer {
    margin-top: auto;
    padding: 1.7rem 1rem;
    color: rgba(255, 254, 250, 0.82);
    background: #71331e;
    text-align: center;
    font-size: 0.88rem;
}

footer p {
    margin: 0;
}

.header-logos {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin: clamp(2rem, 5vw, 3.5rem) -1.5rem 0;
    padding: 0.8rem 1.5rem;
    background: #fffefa;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.header-logos img {
    display: block;
    object-fit: contain;
}

.header-logos img.logo-kmutt {
    width: 195px;
    height: 65px;
}

.header-logos img.logo-rise50 {
    width: 60px;
    height: 55px;
}

.header-logos img.logo-erasmus {
    width: 160px;
    height: 66px;
}

.highlight-box {
    margin: 1.5rem 0;
    padding: 1.25rem 1.4rem;
    border: 1px solid #ead9c3;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
    background: var(--highlight-color);
}

.highlight-box h3 {
    margin-top: 0;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

.speaker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.85rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.speaker-list li {
    margin: 0;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(145deg, #fffefa, #fff9f1);
    box-shadow: 0 4px 14px rgba(112, 54, 25, 0.045);
}

.speaker-list li strong {
    display: inline-block;
    margin-bottom: 0.2rem;
    font-size: 1.03rem;
}

.announcements {
    margin-bottom: 2.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid #ead9c3;
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(215, 138, 74, 0.12), transparent 22rem),
        #fcf7ef;
}

.announcements h2 {
    color: var(--primary-color);
}

.announcement-item + .announcement-item {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8dac7;
}

.announcement-message {
    margin-bottom: 0.35rem;
    color: var(--secondary-color);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.announcement-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: #fffefa;
    background: var(--secondary-color);
    box-shadow: 0 5px 12px rgba(163, 79, 50, 0.16);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.announcement-link span {
    display: block;
    font-size: 0.8rem;
    font-weight: 450;
}

.announcement-link:hover {
    transform: translateY(-1px);
    color: #fffefa;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(112, 54, 25, 0.2);
}

.announcement-link:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.submission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 700px) {
    header {
        padding-top: 3rem;
    }

    nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-inline: 0.65rem;
        scrollbar-width: thin;
    }

    nav a {
        flex: 0 0 auto;
        padding-inline: 0.75rem;
        font-size: 0.85rem;
    }

    .container {
        width: min(100% - 1.25rem, 1080px);
        margin-block: 0.75rem 1.25rem;
        padding: 1.25rem;
        border-radius: 15px;
    }

    .header-logos {
        gap: 0.65rem;
        margin-top: 2rem;
        padding: 0.65rem 0.5rem;
    }

    .header-logos img.logo-kmutt {
        width: min(40vw, 130px);
        height: 43px;
    }

    .header-logos img.logo-rise50 {
        width: 38px;
        height: 35px;
    }

    .header-logos img.logo-erasmus {
        width: min(40vw, 116px);
        height: 48px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 9px;
    }

    th,
    td {
        padding: 0.7rem 0.8rem;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
