:root {
    --ink: #172127;
    --muted: #65737b;
    --paper: #ffffff;
    --soft: #f3f6f5;
    --brand: #456d7a;
    --brand-dark: #243f49;
    --trec: #0a8f78;
    --cso: #a948a4;
    --gold: #d4a034;
    --shadow: 0 22px 60px rgba(10, 24, 32, .18);
    --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--soft);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(100deg, rgba(7, 17, 22, .74), rgba(7, 17, 22, .25) 48%, rgba(7, 17, 22, .65)),
        url("../img/photo-02.jpg") center / cover no-repeat;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 70% 8%, rgba(255, 255, 255, .14), transparent 34%), rgba(0, 0, 0, .12);
    pointer-events: none;
}

a { color: inherit; }
img { max-width: 100%; }

.site-header {
    min-height: 100vh;
    color: white;
    padding: 28px clamp(18px, 4vw, 70px) 80px;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.brand-mark {
    width: 46px;
    height: 46px;
    object-fit: contain;
}
.brand strong {
    display: block;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.brand small {
    display: block;
    color: rgba(229, 255, 232, .85);
    font-size: .82rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(18px);
}
.nav-links a {
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 999px;
    color: rgba(255, 255, 255, .88);
    font-weight: 700;
    font-size: .92rem;
}
.nav-links a:hover {
    background: rgba(255, 255, 255, .96);
    color: var(--brand-dark);
}
.menu-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    color: var(--ink);
    background: white;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: clamp(28px, 5vw, 80px);
    align-items: center;
    min-height: calc(100vh - 110px);
    padding-top: 40px;
}
.hero-card {
    max-width: 760px;
    padding: clamp(26px, 5vw, 64px);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .28));
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
}
.eyebrow {
    margin: 0 0 12px;
    color: #c9f5d3;
    text-transform: uppercase;
    font-weight: 850;
    letter-spacing: .14em;
    font-size: .78rem;
}
.hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 7vw, 6.7rem);
    line-height: .92;
    letter-spacing: -.06em;
}
.hero-text {
    max-width: 620px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.7;
}
.hero-actions,
.quick-access,
.tools-row,
.filter-tabs,
.card-topline,
.card-stats,
.bio-tags,
.footer-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.hero-actions { margin-top: 34px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 850;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--trec));
    box-shadow: 0 12px 30px rgba(10, 143, 120, .28);
}
.btn.secondary {
    color: white;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .24);
}

.hero-side {
    justify-self: end;
    width: min(100%, 520px);
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.hero-logo {
    display: block;
    width: min(340px, 80%);
    margin: 0 auto 22px;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .16));
}
.quick-access {
    justify-content: center;
}
.quick-card {
    flex: 1 1 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 74px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 850;
}
.quick-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.cso-card { background: linear-gradient(135deg, #b24cae, #73348f); }
.trec-card { background: linear-gradient(135deg, #0b9c81, #096654); }

.section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 28px;
}
.intro-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: -52px;
    position: relative;
    z-index: 2;
}
.stat-card {
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 40px rgba(16, 32, 40, .12);
}
.stat-card strong {
    display: block;
    color: var(--brand);
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1;
}
.stat-card span {
    color: var(--muted);
    font-weight: 750;
}

.competitions-section,
.solutions,
.biography,
.contact-card {
    padding: clamp(24px, 5vw, 54px);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 60px rgba(12, 27, 35, .14);
}
.section-heading {
    max-width: 780px;
    margin-bottom: 28px;
}
.section-heading.centered {
    text-align: center;
    margin-inline: auto;
}
.section-heading .eyebrow,
.bio-content .eyebrow,
.contact-card .eyebrow {
    color: var(--trec);
}
.section-heading h2,
.bio-content h2,
.contact-card h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: .98;
    letter-spacing: -.04em;
}
.section-heading p,
.bio-content p,
.contact-card p {
    color: var(--muted);
    line-height: 1.75;
    font-size: 1.05rem;
}

.notice {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}
.notice.warning {
    background: #fff4d8;
    color: #856000;
}
.notice.ok {
    background: #e9f9ef;
    color: #136935;
}
.notice.error {
    background: #fdecec;
    color: #9e2424;
}

.tools-row {
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0 34px;
}
.filter-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    cursor: pointer;
    background: #e9efed;
    color: var(--ink);
    font-weight: 850;
}
.filter-btn.active,
.filter-btn:hover {
    color: white;
    background: var(--brand);
}
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}
.search-box input {
    width: min(320px, 62vw);
    border: 1px solid #d9e0df;
    border-radius: 999px;
    padding: 12px 16px;
    font: inherit;
    outline: none;
}
.search-box input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(69, 109, 122, .12);
}

.competition-group + .competition-group { margin-top: 38px; }
.group-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e3e9e7;
    padding-bottom: 10px;
}
.group-title h3 {
    margin: 0;
    font-size: 1.55rem;
}
.group-title span {
    color: var(--muted);
    font-weight: 800;
}
.competition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.competition-grid.compact .competition-card {
    opacity: .92;
}
.competition-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 18px;
    min-height: 230px;
    padding: 18px;
    border: 1px solid #e4ebe9;
    border-radius: 24px;
    background: linear-gradient(180deg, white, #f8fbfa);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.competition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(20, 38, 46, .13);
    border-color: color-mix(in srgb, var(--discipline-color), white 50%);
}
.competition-card[hidden] { display: none; }
.date-box {
    align-self: start;
    min-height: 112px;
    border-radius: 20px;
    color: white;
    background: linear-gradient(155deg, var(--discipline-color), var(--brand-dark));
    text-align: center;
    padding: 12px 6px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
}
.date-box strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}
.date-box span,
.date-box small {
    display: block;
    font-weight: 850;
    letter-spacing: .08em;
}
.date-box span { margin-top: 6px; }
.date-box small {
    margin-top: 4px;
    opacity: .72;
    font-size: .72rem;
}
.card-body { min-width: 0; }
.card-topline {
    justify-content: space-between;
    gap: 8px;
}
.discipline-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: .76rem;
    font-weight: 900;
}
.discipline-pill {
    color: white;
    background: var(--discipline-color);
}
.discipline-pill img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.status-pill {
    color: var(--brand-dark);
    background: #e8efed;
}
.status-open,
.status-ffe { color: #0c6b40; background: #ddf7e7; }
.status-running { color: #734600; background: #fff0cf; }
.status-finished { color: #5f6870; background: #edf0f2; }
.status-closed { color: #8d2e2e; background: #fde7e7; }
.competition-card h4 {
    margin: 14px 0 8px;
    font-size: 1.35rem;
    line-height: 1.15;
}
.meta-line,
.card-description {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.55;
}
.card-stats {
    margin: 14px 0;
}
.card-stats span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: #eef4f2;
    font-size: .84rem;
    font-weight: 800;
}
.card-link {
    display: inline-flex;
    margin-top: 2px;
    color: var(--discipline-color);
    font-weight: 900;
    text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.empty-card {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 22px;
    color: var(--muted);
    background: #f3f7f6;
    font-weight: 800;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.solution-card {
    padding: 28px;
    border-radius: 26px;
    background: #f8fbfa;
    border: 1px solid #e1e9e6;
}
.solution-card img {
    display: block;
    max-height: 150px;
    width: auto;
    margin: 0 auto 18px;
    object-fit: contain;
}
.solution-card h3 {
    margin: 0 0 10px;
    font-size: 1.6rem;
}
.solution-card p {
    color: var(--muted);
    line-height: 1.7;
}
.solution-card a {
    display: inline-flex;
    margin-top: 10px;
    font-weight: 900;
    color: var(--brand);
    text-decoration: none;
}
.solution-card a:hover { text-decoration: underline; }

.biography {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: clamp(24px, 5vw, 58px);
    align-items: stretch;
}
.bio-photo {
    min-height: 420px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .3)),
        url("../img/photo-04.jpg") center / cover no-repeat;
}
.bio-content {
    align-self: center;
}
.bio-tags span {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: #e9f0ee;
    font-weight: 850;
}

.contact-card {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(24px, 5vw, 60px);
}
.contact-card a { color: var(--trec); font-weight: 900; }
.contact-form {
    display: grid;
    gap: 14px;
}
.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--brand-dark);
    font-weight: 850;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid #dce4e1;
    border-radius: 16px;
    padding: 13px 14px;
    font: inherit;
    outline: none;
    background: white;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(69, 109, 122, .12);
}
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 24px;
    color: white;
    background: rgba(0, 0, 0, .52);
    backdrop-filter: blur(20px);
}
.footer-logos img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    transition: transform .18s ease, opacity .18s ease;
}
.footer-logos a:hover img {
    transform: translateY(-2px) scale(1.05);
    opacity: .86;
}
.site-footer p { margin: 0; color: rgba(255, 255, 255, .84); }

.reveal {
    animation: reveal .72s ease both;
}
.delay-1 { animation-delay: .12s; }
@keyframes reveal {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 980px) {
    .hero,
    .intro-strip,
    .competition-grid,
    .solution-grid,
    .biography,
    .contact-card {
        grid-template-columns: 1fr;
    }
    .hero-side {
        justify-self: stretch;
    }
    .intro-strip { margin-top: -34px; }
}

@media (max-width: 760px) {
    .site-header {
        min-height: auto;
        padding: 16px 14px 64px;
    }
    .top-nav {
        align-items: flex-start;
    }
    .brand {
        border-radius: 20px;
        padding: 9px 11px;
    }
    .brand strong { font-size: 1rem; }
    .brand small { font-size: .74rem; }
    .brand-mark { width: 38px; height: 38px; }
    .menu-toggle { display: inline-flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 62px;
        right: 0;
        width: min(260px, 90vw);
        padding: 10px;
        border-radius: 22px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
    }
    .nav-links.open { display: grid; }
    .nav-links a {
        color: var(--ink);
        border-radius: 16px;
    }
    .nav-links a:hover {
        background: #eef4f2;
    }
    .hero {
        min-height: auto;
        padding-top: 42px;
    }
    .hero-card,
    .hero-side,
    .competitions-section,
    .solutions,
    .biography,
    .contact-card {
        border-radius: 24px;
    }
    .hero h1 {
        letter-spacing: -.045em;
    }
    .tools-row {
        align-items: stretch;
    }
    .search-box {
        width: 100%;
        display: grid;
    }
    .search-box input { width: 100%; }
    .competition-card {
        grid-template-columns: 1fr;
    }
    .date-box {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 70px;
        text-align: left;
    }
    .date-box strong { font-size: 1.6rem; }
    .date-box span,
    .date-box small { margin: 0; }
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .hero-actions .btn,
    .contact-form .btn {
        width: 100%;
    }
    .quick-card { flex-basis: 100%; }
    .filter-tabs { width: 100%; }
    .filter-btn { flex: 1 1 auto; }
    .card-topline { align-items: flex-start; }
}
