:root {
    --purple: #660874;
    --purple-dark: #470652;
    --purple-soft: #f6eef8;
    --teal: #0f766e;
    --teal-soft: #eaf7f4;
    --amber: #9a6700;
    --ink: #20252c;
    --muted: #5b6570;
    --line: #dfe4e8;
    --soft: #f6f8f9;
    --white: #ffffff;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: var(--purple);
    text-underline-offset: 3px;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

.skip-link {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 2000;
    padding: 8px 12px;
    color: var(--white);
    background: var(--purple);
    border-radius: 4px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.wrap {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.section-band {
    width: 100%;
    scroll-margin-top: 78px;
}

.section-tinted {
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 66px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 4px solid var(--purple);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-wrap {
    position: relative;
    width: min(1120px, calc(100% - 48px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-name {
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.site-name span {
    color: var(--purple);
    font-weight: 700;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.primary-nav a {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: var(--purple);
}

.primary-nav .language-link {
    color: var(--purple);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 3px auto;
    background: var(--ink);
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.hero {
    overflow: hidden;
}

.hero-grid {
    min-height: 625px;
    padding: 68px 0 76px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 72px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: 54px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: 0;
}

h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: 0;
}

.role {
    margin: 10px 0 0;
    color: var(--purple);
    font-size: 18px;
    font-weight: 700;
}

.hero-thesis {
    max-width: 720px;
    margin: 28px 0 20px;
    color: var(--ink);
    font-size: 25px;
    font-weight: 450;
    line-height: 1.35;
}

.hero-intro {
    max-width: 720px;
    color: var(--muted);
    font-size: 16px;
}

.hero-intro p {
    margin: 0 0 10px;
}

.hero-intro strong {
    color: var(--ink);
}

.hero-intro a {
    font-weight: 650;
    text-decoration: none;
}

.hero-intro a:hover {
    text-decoration: underline;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-actions {
    margin-top: 26px;
}

.action {
    min-height: 42px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #cfd6dc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.action:hover,
.action:focus-visible {
    color: var(--purple);
    border-color: var(--purple);
}

.action-primary {
    color: var(--white);
    background: var(--purple);
    border-color: var(--purple);
}

.action-primary:hover,
.action-primary:focus-visible {
    color: var(--white);
    background: var(--purple-dark);
    border-color: var(--purple-dark);
}

.portrait-column {
    display: flex;
    justify-content: center;
}

.portrait-flip {
    width: 300px;
    height: 400px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    perspective: 1200px;
    cursor: pointer;
}

.portrait-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 700ms cubic-bezier(0.2, 0.8, 0.25, 1);
}

.portrait-flip.is-flipped .portrait-inner {
    transform: rotateY(180deg);
}

.portrait-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.portrait-front {
    overflow: hidden;
    background: #dbe6d2;
    box-shadow: 0 18px 44px rgba(32, 37, 44, 0.16);
}

.portrait-front > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transform-origin: 50% 44%;
}

.flip-cue {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(32, 37, 44, 0.12);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(32, 37, 44, 0.14);
    font-size: 15px;
}

.portrait-back {
    transform: rotateY(180deg);
}

.portrait-flip:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.35);
    outline-offset: 5px;
}

.gold-card {
    position: relative;
    display: block;
    width: 217px;
    height: 330px;
    overflow: hidden;
    color: #46390c;
    background: url("../../assets/card/gitfut-gold-card.png") center / 100% 100% no-repeat;
    transform: scale(1.21);
    filter: drop-shadow(0 18px 24px rgba(72, 52, 9, 0.27));
}

.gold-tier {
    position: absolute;
    z-index: 4;
    top: 34px;
    right: 28px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.gold-photo-wrap {
    position: absolute;
    z-index: 2;
    left: -8px;
    top: 40px;
    width: 226px;
    height: 150px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
}

.gold-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.gold-lower {
    position: absolute;
    z-index: 3;
    top: 191px;
    left: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gold-lower > strong {
    width: 100%;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(70, 57, 12, 0.42);
    font-size: 19px;
    line-height: 1.2;
}

.gold-stats {
    width: 100%;
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    font-size: 7px;
    font-weight: 800;
    line-height: 1.2;
}

.gold-stats > span {
    padding: 0 4px;
    display: flex;
    flex-direction: column;
}

.gold-stats > span + span {
    border-left: 1px solid rgba(70, 57, 12, 0.35);
}

.gold-stats b {
    font-size: 13px;
}

.gold-badges {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

.gold-badges img {
    width: 20px;
    height: 20px;
    padding: 2px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 50%;
}

.section-band:not(.hero) > .wrap {
    padding-top: 82px;
    padding-bottom: 86px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 44px;
}

.section-heading > p:last-child {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.section-heading-narrow {
    max-width: 690px;
}

.direction-grid {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    border-top: 1px solid #cfd6dc;
    border-bottom: 1px solid #cfd6dc;
}

.direction-grid li {
    min-width: 0;
    padding: 28px 30px 30px;
}

.direction-grid li:first-child {
    padding-left: 0;
}

.direction-grid li + li {
    border-left: 1px solid #cfd6dc;
}

.direction-number {
    display: block;
    margin-bottom: 26px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
}

.direction-grid h3 {
    font-size: 18px;
}

.direction-grid p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.work-item {
    padding: 34px 0 38px;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 36px;
    border-top: 1px solid var(--line);
}

.work-item-spork {
    border-top: 3px solid var(--teal);
}

.work-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.work-meta strong {
    color: var(--ink);
    font-size: 14px;
}

.role-tag {
    padding: 3px 7px;
    border-radius: 4px;
    color: var(--purple-dark);
    background: var(--purple-soft);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
    text-transform: uppercase;
}

.role-first {
    color: #075e57;
    background: var(--teal-soft);
}

.role-lead {
    color: var(--white);
    background: var(--purple);
}

.work-body h3 {
    max-width: 830px;
    font-size: 23px;
}

.authors {
    margin: 8px 0 15px;
    color: var(--muted);
    font-size: 13px;
}

.work-body > p:not(.authors) {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.result-list {
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.result-list li {
    padding: 6px 9px;
    color: #39434b;
    background: var(--soft);
    border-radius: 4px;
    font-size: 12px;
}

.result-list strong {
    color: var(--ink);
}

.work-links,
.text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.work-links {
    margin-top: 19px;
}

.work-links a,
.text-links a {
    color: var(--purple);
    font-size: 13px;
    font-weight: 750;
    text-decoration-thickness: 1px;
}

.additional-work {
    margin-top: 22px;
    padding-top: 36px;
    border-top: 3px solid var(--ink);
}

.additional-work h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.additional-work ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.additional-work li {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.additional-work li strong {
    color: var(--ink);
    font-size: 14px;
}

.additional-work li a {
    flex: 0 0 auto;
    color: var(--purple);
    font-size: 12px;
    font-weight: 750;
}

.equal-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.background-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 80px;
}

.section-heading-small {
    margin-bottom: 30px;
}

.section-heading-small h2 {
    font-size: 25px;
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #cfd6dc;
}

.timeline li {
    padding: 18px 0;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    border-bottom: 1px solid #cfd6dc;
}

.timeline time {
    color: var(--teal);
    font-size: 12px;
    font-weight: 750;
}

.timeline div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.timeline strong {
    font-size: 14px;
}

.timeline span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.service-note {
    margin-top: 28px;
    padding-left: 16px;
    border-left: 3px solid var(--purple);
}

.service-note strong {
    font-size: 13px;
}

.service-note p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.community-grid {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: center;
    gap: 40px;
}

.community-cover {
    width: 148px;
    height: 148px;
    object-fit: cover;
    border-radius: 8px;
}

.community-grid h2 {
    font-size: 28px;
}

.community-grid p:not(.eyebrow) {
    max-width: 760px;
    margin: 12px 0 18px;
    color: var(--muted);
}

.contact-band {
    color: var(--white);
    background: var(--ink);
}

.contact-band .eyebrow {
    color: #5eead4;
}

.contact-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.contact-grid h2 {
    color: var(--white);
}

.contact-grid p:not(.eyebrow) {
    margin: 13px 0 0;
    color: #b9c2c9;
    font-size: 14px;
}

.contact-actions .action:not(.action-primary) {
    color: var(--white);
    background: transparent;
    border-color: #58636c;
}

.contact-actions .action:not(.action-primary):hover,
.contact-actions .action:not(.action-primary):focus-visible {
    border-color: var(--white);
}

footer {
    background: #15191e;
    border-top: 1px solid #343c44;
}

.footer-row {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #aeb7be;
    font-size: 12px;
}

.footer-row p {
    margin: 0;
}

.footer-row a {
    color: #d7dde1;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 44px;
    }

    .portrait-flip {
        width: 260px;
        height: 350px;
    }

    .gold-card {
        transform: scale(1.06);
    }

    .background-grid {
        gap: 48px;
    }
}

@media (max-width: 760px) {
    .wrap,
    .nav-wrap {
        width: min(100% - 32px, 1120px);
    }

    .menu-toggle {
        display: block;
    }

    .primary-nav {
        position: absolute;
        left: -16px;
        right: -16px;
        top: 62px;
        padding: 14px 16px 18px;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 24px rgba(32, 37, 44, 0.08);
    }

    .primary-nav.is-open {
        display: flex;
    }

    .primary-nav a {
        min-height: 42px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--line);
    }

    .primary-nav a:last-child {
        border-bottom: 0;
    }

    .hero-grid {
        min-height: 0;
        padding: 48px 0 60px;
        grid-template-columns: 1fr;
        gap: 42px;
    }

    h1 {
        font-size: 43px;
    }

    .role {
        font-size: 16px;
    }

    .hero-thesis {
        margin-top: 24px;
        font-size: 22px;
    }

    .portrait-column {
        justify-content: flex-start;
    }

    .portrait-flip {
        width: 225px;
        height: 305px;
    }

    .gold-card {
        transform: scale(0.93);
    }

    .section-band:not(.hero) > .wrap {
        padding-top: 64px;
        padding-bottom: 68px;
    }

    .direction-grid {
        grid-template-columns: 1fr;
    }

    .direction-grid li,
    .direction-grid li:first-child {
        padding: 24px 0;
    }

    .direction-grid li + li {
        border-top: 1px solid #cfd6dc;
        border-left: 0;
    }

    .direction-number {
        margin-bottom: 12px;
    }

    .work-item {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .work-meta {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .work-body h3 {
        font-size: 20px;
    }

    .background-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .community-grid {
        grid-template-columns: 108px minmax(0, 1fr);
        align-items: start;
        gap: 24px;
    }

    .community-cover {
        width: 108px;
        height: 108px;
    }

    .contact-grid {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .site-name {
        font-size: 17px;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 27px;
    }

    .hero-actions .action {
        flex: 1 1 calc(50% - 9px);
    }

    .hero-actions .action:last-child {
        flex-basis: 100%;
    }

    .portrait-column {
        justify-content: center;
    }

    .additional-work li {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .timeline li {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 12px;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }

    .community-cover {
        width: 96px;
        height: 96px;
    }

    .footer-row {
        padding: 18px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

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

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