@keyframes category-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.about-image {
    width: 50%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 5px 8px 15px rgba(0, 0, 0, 0.6);
}
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 50px;
    align-items: center;
    margin-top: 50px;
}
.about-intro .about-image {
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
.about-intro-text {
    position: relative;
    z-index: 1;
}
.about-page {
   margin-top: 60px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-left: 5%;
    padding-right: 5%;
    background:
        radial-gradient(ellipse at 82% 8%, rgba(0, 171, 162, 0.14), transparent 32rem),
        linear-gradient(145deg, #121719 0%, #090c0e 52%, #111719 100%);
}

.about-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 80% 9%, rgba(0, 171, 162, 0.12), transparent 1px),
        repeating-linear-gradient(132deg, transparent 0 112px, rgba(164, 222, 219, 0.035) 113px 114px, transparent 115px 190px);
    background-size: 24px 24px, auto;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 100%);
    pointer-events: none;
}
.about-page .about-intro p {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.8;
    color: #cfcfcf;
    margin: 0 0 22px;
    text-align: left;
}
.about-page .about-intro p.about-quote {
    grid-column: 1 / -1;
    font-size: clamp(1.4rem, 2.2vw, 2.2rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--white);
    margin-bottom: 0;
}
.about-page .container {
    max-width: none;
}
.about-page .second > p {
    text-align: center;
}
.about-page h1 {
    text-align: left;
    margin-bottom: 20px;
    margin-top: 40px;
    font-size: 20px;
    font-weight: 300;
    text-shadow: #919191 5px 5px 5px;
    scroll-margin-top: 100px;
}
.about-page h2 {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
    text-shadow: #0a0a0a 5px 5px 5px;
    scroll-margin-top: 100px;
}

.about-page .first > h2 {
    margin: 0 0 40px;
    color: #f7f9f9;
    font-family: 'Korataki', system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 1px;
    text-align: left;
    text-shadow: none;
}
.about-page .about-kicker {
    margin: 0 0 12px;
    color: #54cbc3;
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.5;
    text-align: left;
    text-transform: uppercase;
}

.about-page p {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    max-width: none;
    margin: 20px 0;
    font-size: 1.2rem;
    text-align: justify;
}
.achievements {
    position: relative;
    margin-right: -5.55556%;
    padding-right: min(38vw, 560px);
    overflow: hidden;
}
.achievements-driver {
    position: absolute;
    right: -150px;
    top: 20px;
    width: min(40vw, 580px);
    height: auto;
    opacity: 1;
    filter: brightness(0.7) contrast(1.05);
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.achievements-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    margin: 60px calc(-1 * min(38vw, 560px)) 40px -5vw;
}
.achievements-heading-text {
    position: relative;
    z-index: 2;
    text-align: center;
}
.achievements-heading-text h2 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(0, 171, 162, 0.9), rgba(255, 255, 255, 0.95));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin: 0;
    padding: 20px 0;
}
.categories-container {
    margin: 60px 0;
    max-width: none;
}
.categories-container.tabs-on .category-item {
    display: none;
}
.categories-container.tabs-on .category-item.active {
    display: flex;
    animation: category-fade 0.4s ease;
}
.category-abbr {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    font-size: clamp(8rem, 18vw, 19rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 5px;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.13);
    text-shadow: none;
}
.category-full,
.category-item p {
    position: relative;
    z-index: 1;
}
.category-full {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}
.category-item {
    margin: 0;
    padding: 80px 6%;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.category-item p {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.category-tab {
    font-family: inherit;
    font-size: 2.4rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.4);
    background: none;
    border: none;
    border-bottom: 3px solid rgba(255, 255, 255, 0.15);
    padding: 18px 64px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.category-tab:hover,
.category-tab.active {
    color: var(--white);
    border-bottom-color: var(--accent);
}
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 50px 0 0;
}
.dynamic-controls:not([hidden]) {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 40px;
}
.dynamic-controls button {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.dynamic-controls button:hover:not(:disabled),
.dynamic-controls button:focus-visible {
    border-color: var(--white);
    color: var(--accent);
}
.dynamic-controls button:disabled {
    opacity: 0.3;
    cursor: default;
}
.event-card {
    background: rgba(10, 10, 10, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    border: 2px solid rgba(0, 171, 162, 0.2);
}
.event-card:hover {
    border-color: var(--white);
    box-shadow: 0 20px 40px rgba(0, 171, 162, 0.3);
}
.event-card:hover .event-image {
    transform: scale(1.1);
}
.event-content {
    padding: 25px;
}
.event-content p {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--white);
    margin: 0;
    text-align: left;
}
.event-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}
.event-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.event-list {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin: 10px 0 20px 20px;
    text-align: left;
}
.event-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 25px 20px;
    min-height: 150px;
    display: flex;
    align-items: flex-start;
}
.event-title {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}
.first h2 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #767575 5px 5px 5px;
}
.fourth .dinamic-events {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 32px;
    margin: 24px 0 60px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-color: #777 transparent;
    scrollbar-width: thin;
    padding: 24px 0 20px;
}
.fourth .dinamic-events .event-card {
    flex: 0 0 min(68%, 800px);
    min-width: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    scroll-snap-align: start;
    text-align: left;
}
.fourth .dinamic-events .event-card:hover {
    transform: none;
    box-shadow: none;
}
.fourth .event-card:hover .event-image-wrapper {
    box-shadow: 0 0 24px rgba(0, 171, 162, 0.5);
}
.fourth .event-card:hover .event-image {
    transform: none;
}
.fourth .event-content {
    padding: 24px 0 0;
}
.fourth .event-content p {
    text-align: left;
    color: #cfcfcf;
}
.fourth .event-content p + p {
    margin-top: 16px;
}
.fourth .event-image {
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}
.fourth .event-image-wrapper {
    transition: box-shadow 0.4s ease;
}
.fourth .event-overlay {
    min-height: 0;
    align-items: flex-end;
    padding: 70px 28px 24px;
}
.fourth h1 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #767575 5px 5px 5px;
}
.second h1 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #767575 5px 5px 5px;
}
.static-events,
.dinamic-events {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
}
.static-events .event-card,
.dinamic-events .event-card {
    flex: 0 0 calc((100% - 80px) / 3);
    min-width: 320px;
}
.third h1 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 75px;
    font-size: 27px;
    font-weight: 100;
    text-shadow: #989898 5px 5px 5px;
}
.timeline-container {
    position: relative;
    max-width: 1100px;
    margin: 60px auto;
}
.timeline-line {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 154px;
    width: 1px;
    background: rgba(255, 255, 255, 0.25);
}
.timeline-year {
    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 56px;
    text-align: left;
}
.timeline-year:last-child {
    padding-bottom: 0;
}
.year-dot {
    flex: 0 0 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--black);
    border: 2px solid var(--white);
}
.year-label {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 800;
    margin: 0;
    color: var(--white);
}
.year-marker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    align-self: start;
}
.year-results {
    min-width: 0;
}
.year-results .place-bronze {
    color: #cd7f32;
}
.year-results .place-gold {
    color: #d4af37;
}
.year-results .place-label {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: #bfbfbf;
}
.year-results .place-silver {
    color: #c0c0c0;
}
.year-results .result-competition {
    color: var(--accent);
}
.year-results .result-place {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-right: 0.5em;
    vertical-align: baseline;
    white-space: nowrap;
}
.year-results .result-place sup {
    font-size: 0.45em;
    line-height: 0;
    vertical-align: baseline;
}
.year-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.year-results ul li {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfcfcf;
    font-size: 1rem;
    line-height: 1.6;
}
.year-results ul li:first-child {
    padding-top: 4px;
}
.year-results ul li:first-child.result-wrapped {
    padding-top: 10px;
}
.year-results ul li b {
    color: var(--white);
}
.year-results ul li.result-wrapped {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 1em;
}
.year-results ul li.result-wrapped .result-place {
    margin-right: 0;
    transform: translateY(-4px);
}
/* About/Rólunk Page Styles */

.about-preview,
.about-page {
    background: var(--white);
    color: rgb(255, 255, 255);
    background-image:
    linear-gradient(
      rgb(0, 0, 0),
      rgb(0, 0, 0),
      rgba(0, 171, 162, 0.6)
    ),
    url('../images/logo1.png');
    transition: background 0.9s ease;
}

.about-page {
    background:
        radial-gradient(ellipse at 82% 8%, rgba(0, 171, 162, 0.14), transparent 32rem),
        linear-gradient(145deg, #121719 0%, #0a0e0f 52%, #111719 100%);
}

@media (max-width: 900px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .achievements {
        margin-right: 0;
        padding-right: 0;
        display: flex;
        flex-direction: column;
    }

    .achievements-driver {
        display: none;
    }

    .achievements-heading {
        order: 1;
        margin: 60px 0 40px;
    }

    .achievements .timeline-container {
        order: 3;
        width: 100%;
    }

    .achievements-heading-text h2 {
        font-size: 2.2rem;
        padding: 15px 0;
    }

    .category-tab {
        padding: 12px 22px;
        font-size: 1.5rem;
    }

    .category-tabs {
        gap: 14px;
    }

    .category-abbr {
        font-size: 6rem;
    }

    .static-events,
    .dinamic-events {
        display: grid;
        grid-template-columns: 1fr;
    }

    .static-events .event-card,
    .dinamic-events .event-card {
        min-width: 0;
    }

    .static-events {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-title {
        font-size: 1.4rem;
    }

    .fourth .dinamic-events {
        gap: 20px;
    }

    .fourth .dinamic-events .event-card {
        flex-basis: 88%;
    }

    .timeline-container {
        margin: 40px auto 60px;
    }

    .timeline-line {
        left: 69px;
        top: 8px;
        bottom: 8px;
    }

    .timeline-year {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 20px;
        padding-bottom: 36px;
    }

    .year-label {
        font-size: 1.45rem;
    }

    .year-results ul li {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .about-page {
        padding: 116px 20px 70px;
    }

    .about-page .first > h2 {
        font-size: clamp(1.35rem, 6.6vw, 1.8rem);
        overflow-wrap: normal;
        word-break: normal;
    }

    .about-page p,
    .about-page .about-intro p {
        font-size: 0.95rem;
        line-height: 1.65;
        text-align: left;
    }

    .about-page .about-intro p.about-quote {
        font-size: 1.2rem;
    }

    .about-page h1,
    .first h2,
    .second h1,
    .third h1,
    .fourth h1 {
        margin-top: 48px;
        font-size: clamp(1.05rem, 5.3vw, 1.4rem);
        max-width: 100%;
        letter-spacing: 0;
        overflow-wrap: normal;
        word-break: normal;
    }

    .category-tabs {
        gap: 8px;
    }

    .category-tab {
        flex: 1;
        padding: 10px 0;
        font-size: 1.2rem;
    }

    .category-item {
        min-height: 320px;
        padding: 50px 20px;
    }

    .category-abbr {
        font-size: clamp(4rem, 20vw, 5.5rem);
    }

    .event-content {
        padding: 20px 16px;
    }

    .fourth .dinamic-events .event-card {
        flex-basis: 100%;
    }

    .fourth .dinamic-events {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .timeline-year {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
    }

    .timeline-line {
        left: 7px;
    }

    .year-marker {
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
    }

    .year-label {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .year-dot {
        width: 13px;
        flex-basis: 13px;
    }

    .achievements {
        margin-top: 0;
        padding-right: 0;
    }

    .achievements-heading {
        margin: 12px 0 8px;
    }

    .achievements-heading-text h2 {
        padding: 0;
    }

    .timeline-container {
        margin-top: 12px;
    }
}
.linkedin-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1);
}

.linkedin-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.3);
}

@media (prefers-reduced-motion: reduce) {
    .fourth .dinamic-events {
        scroll-behavior: auto;
    }
}
