﻿/* ==============================================
   SHOWA RETRO -- 1970s Japan, kissaten, City Pop
   ============================================== */

@font-face {
    font-family: 'RetroLocal';
    src: local('Georgia'), local('Times New Roman');
}

:root {
    --kuro: #1c1714;
    --sumi: #2a2118;
    --cha: #5c4a3a;
    --kinari: #f0e8d8;
    --washi: #e6dcc8;
    --kabe: #d4c9b2;
    --shu: #bf3b2c;
    --shu-dark: #8f2a1e;
    --shu-faded: rgba(191, 59, 44, .08);
    --ai: #2e5e78;
    --ai-faded: rgba(46, 94, 120, .08);
    --matcha: #5a7355;
    --karashi: #b5870f;
    --cream-hot: #f7e9c8;

    --font-title: 'Libre Baskerville', Georgia, serif;
    --font-body: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'DotGothic16', monospace;
    --font-nav: 'Kaisei Tokumin', 'Zen Old Mincho', 'Shippori Mincho', serif;
    --font-nav-display: 'Yuji Syuku', 'Kaisei Tokumin', 'Zen Old Mincho', serif;
    --max-w: 980px;
    --hero-kumiko-svg: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d7b77d' stroke-width='0.65' opacity='0.3'%3E%3Cpath d='M50 0L100 50L50 100L0 50Z'/%3E%3Cpath d='M50 0L50 100'/%3E%3Cpath d='M0 50L100 50'/%3E%3Cpath d='M25 25L75 25L75 75L25 75Z'/%3E%3Cpath d='M50 0L25 25'/%3E%3Cpath d='M50 0L75 25'/%3E%3Cpath d='M100 50L75 25'/%3E%3Cpath d='M100 50L75 75'/%3E%3Cpath d='M50 100L75 75'/%3E%3Cpath d='M50 100L25 75'/%3E%3Cpath d='M0 50L25 75'/%3E%3Cpath d='M0 50L25 25'/%3E%3Ccircle cx='50' cy='50' r='8'/%3E%3Cpath d='M50 42L58 50L50 58L42 50Z'/%3E%3C/g%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--kinari);
    color: var(--kuro);
    line-height: 1.75;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    /* heavy film grain */
    background-image:
        url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='4' type='fractalNoise' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.045'/%3E%3C/svg%3E"),
        /* subtle asanoha-like pattern */
        url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L40 20L20 40L0 20Z' fill='none' stroke='%23d4c9b2' stroke-width='0.4'/%3E%3Cpath d='M20 0L20 40M0 20L40 20' fill='none' stroke='%23d4c9b2' stroke-width='0.2'/%3E%3C/svg%3E");
}

a {
    color: var(--shu);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--shu-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

ul,
ol {
    list-style: none;
}

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
}

/* ============================
   TOPBAR -- old train station
   ============================ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--sumi);
    border-bottom: 3px solid var(--shu);
}

.topbar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.topbar-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    flex-shrink: 0;
    min-width: 0;
    padding: 0 2px 0 0;
    color: var(--kinari);
    line-height: 1;
    position: relative;
    transition: color .2s ease;
}

.topbar-name::after {
    content: '';
    position: absolute;
    left: 40px;
    right: 2px;
    bottom: 11px;
    height: 1px;
    background: rgba(191, 59, 44, .8);
    opacity: .72;
    transform: scaleX(1);
    transform-origin: left center;
    transition: opacity .2s ease;
}

.topbar-name-seal {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(191, 59, 44, .16), rgba(191, 59, 44, .05));
    border: 1px solid rgba(191, 59, 44, .9);
    box-shadow:
        inset 0 0 0 1px rgba(191, 59, 44, .18),
        0 2px 8px rgba(0, 0, 0, .16);
    color: rgba(247, 233, 200, .94);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-indent: 0.08em;
    transform-origin: 50% 50%;
    animation: topbar-seal-imprint 5.4s cubic-bezier(.4, 0, .2, 1) infinite;
    transition: background .2s ease, box-shadow .2s ease, color .2s ease, filter .2s ease;
    will-change: transform, box-shadow, filter;
}

.topbar-name-seal::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(247, 233, 200, .14);
    opacity: .55;
}

.topbar-name-roman {
    display: inline-block;
    font-family: var(--font-nav-display);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.22rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: inherit;
    white-space: nowrap;
    line-height: 1;
    transform: translateY(-1px);
    text-shadow:
        0 1px 0 rgba(0, 0, 0, .28),
        0 0 14px rgba(247, 233, 200, .1);
}

.topbar-name:hover {
    color: var(--cream-hot);
    text-decoration: none;
}

.topbar-name:hover::after {
    opacity: 1;
}

.topbar-name:hover .topbar-name-seal {
    background: linear-gradient(180deg, rgba(191, 59, 44, .22), rgba(191, 59, 44, .08));
    box-shadow:
        inset 0 0 0 1px rgba(191, 59, 44, .24),
        0 3px 10px rgba(143, 42, 30, .18);
    animation-duration: 2.4s;
}

.topbar-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.topbar-nav a {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-nav);
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: rgba(240, 232, 216, .5);
    height: 100%;
    padding: 0 8px;
    white-space: nowrap;
    line-height: .96;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, .26),
        0 0 10px rgba(247, 233, 200, .04);
    transition: color .2s ease, text-shadow .2s ease;
    position: relative;
}

.topbar-nav a:hover {
    color: var(--kinari);
    text-shadow:
        0 1px 0 rgba(0, 0, 0, .24),
        0 0 10px rgba(247, 233, 200, .08);
    text-decoration: none;
}

.topbar-nav a.active {
    color: var(--cream-hot);
    text-shadow:
        0 1px 0 rgba(0, 0, 0, .24),
        0 0 12px rgba(247, 233, 200, .12);
}

.topbar-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--shu);
}

/* Language toggle button */
.lang-btn {
    background: none;
    border: 1px solid rgba(191, 59, 44, .55);
    color: rgba(240, 232, 216, .7);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 3px 8px;
    line-height: 1.4;
    transition: color .2s, border-color .2s, background .2s;
    flex-shrink: 0;
    margin-left: 14px;
}

.lang-btn:hover {
    color: var(--cream-hot);
    border-color: var(--shu);
    background: rgba(191, 59, 44, .08);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    position: relative;
}

.menu-btn span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--kinari);
    position: absolute;
    left: 5px;
    transition: .25s;
}

.menu-btn span:nth-child(1) {
    top: 8px;
}

.menu-btn span:nth-child(2) {
    top: 13px;
}

.menu-btn span:nth-child(3) {
    top: 18px;
}

.menu-btn.open span:nth-child(1) {
    top: 13px;
    transform: rotate(45deg);
}

.menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.menu-btn.open span:nth-child(3) {
    top: 13px;
    transform: rotate(-45deg);
}

.page {
    padding-top: 54px;
}


/* =================================
   HERO -- ekimeihyou (station sign)
   ================================= */
.hero {
    color: var(--kinari);
    padding: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #3a3530;
    background-image: linear-gradient(180deg, rgba(58, 53, 48, .88) 0%, rgba(34, 29, 24, .94) 100%);
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    inset: -14%;
    pointer-events: none;
    z-index: 0;
    background-image: var(--hero-kumiko-svg);
    background-repeat: repeat;
    background-position: 0 0;
    transform-origin: center;
    will-change: transform, opacity, background-position;
}

.hero::before {
    background-size: 128px 128px;
    opacity: .42;
    mix-blend-mode: screen;
    animation: kumiko-drift 32s linear infinite;
}

.hero::after {
    background-size: 196px 196px;
    opacity: .2;
    filter: blur(.35px);
    mix-blend-mode: screen;
    animation: kumiko-float 18s ease-in-out infinite alternate;
}

.hero-ceiling {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(240, 215, 168, .24), transparent 36%),
        radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, .24) 100%);
    pointer-events: none;
    z-index: 1;
}

/* wrapper centers the sign */
.eki-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 48px 32px;
}

@keyframes kumiko-drift {

    0% {
        transform: translate3d(0, 0, 0) scale(1);
        background-position: 0 0;
        opacity: .34;
    }

    50% {
        opacity: .48;
    }

    100% {
        transform: translate3d(-56px, -36px, 0) scale(1.06);
        background-position: 132px 88px;
        opacity: .38;
    }
}

@keyframes kumiko-float {

    0% {
        transform: translate3d(-2%, 2%, 0) rotate(0deg) scale(1.04);
        opacity: .16;
    }

    50% {
        opacity: .24;
    }

    100% {
        transform: translate3d(2%, -3%, 0) rotate(2.5deg) scale(1.12);
        opacity: .18;
    }
}

/* the sign itself -- white panel, backlit by old neon */
.eki-sign {
    background-color: #ede8dd;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c4b6a0' stroke-width='0.4' opacity='0.18'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z'/%3E%3Cpath d='M30 0L30 60'/%3E%3Cpath d='M0 30L60 30'/%3E%3Cpath d='M15 15L45 15L45 45L15 45Z'/%3E%3Cpath d='M30 0L15 15M30 0L45 15M60 30L45 15M60 30L45 45M30 60L45 45M30 60L15 45M0 30L15 45M0 30L15 15'/%3E%3Ccircle cx='30' cy='30' r='5'/%3E%3C/g%3E%3C/svg%3E");
    color: var(--kuro);
    max-width: 720px;
    width: 100%;
    border: 3px solid var(--kuro);
    position: relative;
    box-shadow:
        0 0 15px 2px rgba(255, 245, 220, .25),
        0 0 40px 5px rgba(255, 235, 200, .12),
        0 0 80px 15px rgba(255, 220, 180, .06),
        8px 8px 0 rgba(0, 0, 0, .25);
    animation: neon-flicker 4s ease-in-out infinite;
}

/* aged/worn overlay on sign */
.eki-sign::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    box-shadow: inset 0 0 40px rgba(120, 100, 70, .12);
    pointer-events: none;
    z-index: 1;
}

.eki-hanko {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    color: rgba(191, 59, 44, .92);
    background: rgba(191, 59, 44, .05);
    border: 2px solid rgba(191, 59, 44, .82);
    box-shadow:
        inset 0 0 0 2px rgba(191, 59, 44, .18),
        0 4px 14px rgba(143, 42, 30, .12);
    transform: rotate(0deg);
    z-index: 2;
    pointer-events: none;
}

.eki-hanko svg {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    opacity: .5;
}

.eki-hanko-text {
    position: relative;
    z-index: 1;
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
}

@keyframes neon-flicker {

    0%,
    100% {
        box-shadow: 0 0 15px 2px rgba(255, 245, 220, .25), 0 0 40px 5px rgba(255, 235, 200, .12), 0 0 80px 15px rgba(255, 220, 180, .06), 8px 8px 0 rgba(0, 0, 0, .25);
    }

    30% {
        box-shadow: 0 0 18px 3px rgba(255, 245, 220, .3), 0 0 45px 8px rgba(255, 235, 200, .15), 0 0 90px 18px rgba(255, 220, 180, .08), 8px 8px 0 rgba(0, 0, 0, .25);
    }

    50% {
        box-shadow: 0 0 12px 1px rgba(255, 245, 220, .18), 0 0 35px 4px rgba(255, 235, 200, .08), 0 0 70px 12px rgba(255, 220, 180, .04), 8px 8px 0 rgba(0, 0, 0, .25);
    }

    70% {
        box-shadow: 0 0 16px 2px rgba(255, 245, 220, .28), 0 0 42px 6px rgba(255, 235, 200, .14), 0 0 85px 16px rgba(255, 220, 180, .07), 8px 8px 0 rgba(0, 0, 0, .25);
    }
}

/* colored line stripe top & bottom */
.eki-line-stripe {
    height: 8px;
    background: var(--shu);
}

/* sign body content */
.eki-body {
    padding: 28px 36px 20px;
}

/* center block: name, subtitle, desc */
.eki-center {
    text-align: center;
    margin-bottom: 24px;
}

.eki-desc {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cha);
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.eki-name {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--kuro);
    margin-bottom: 8px;
}

.eki-subtitle {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--cha);
    letter-spacing: 0.04em;
}

.eki-subtitle em {
    font-style: italic;
    color: var(--shu);
    padding: 0 3px;
}

.eki-detail {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cha);
}

.eki-detail a {
    color: var(--cha);
}

.eki-detail a:hover {
    color: var(--shu);
}

/* directions row (adjacent "stations") */
.eki-directions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--kabe);
    padding-top: 18px;
    gap: 16px;
}

.eki-dir {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.eki-dir-left {
    justify-content: flex-start;
}

.eki-dir-right {
    justify-content: flex-end;
    text-align: right;
}

.eki-arrow {
    width: 60px;
    height: 28px;
    color: var(--shu);
    flex-shrink: 0;
}

.eki-dir-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eki-dir-sub {
    font-family: var(--font-title);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--kuro);
}

.eki-dir-sub a {
    color: var(--kuro);
}

.eki-dir-sub a:hover {
    color: var(--shu);
}

.eki-dir-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--cha);
    letter-spacing: 0.04em;
}

/* center photo (like station mascot) */
.eki-dir-center-icon {
    flex-shrink: 0;
}

.eki-photo {
    width: 64px;
    height: 64px;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--kuro);
    border-radius: 4px;
    filter: sepia(0.1) contrast(1.05);
}

/* ============================
   PAGE HEADER (sub-pages)
   ============================ */
.page-header {
    background: var(--sumi);
    color: var(--kinari);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.page-header::before,
.page-header::after {
    content: '';
    position: absolute;
    inset: -10%;
    pointer-events: none;
    z-index: 0;
    background-image: var(--hero-kumiko-svg);
    background-repeat: repeat;
    mix-blend-mode: screen;
}

.page-header::before {
    background-size: 104px 104px;
    opacity: .2;
    transform: rotate(-2deg);
}

.page-header::after {
    background-size: 168px 168px;
    opacity: .08;
    transform: rotate(3deg) scale(1.06);
}

.page-header .header-frame {
    margin: 20px;
    border: 1px solid rgba(191, 59, 44, .2);
    padding: 36px 32px 28px;
    position: relative;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(42, 33, 24, .76), rgba(42, 33, 24, .58)),
        radial-gradient(circle at top center, rgba(247, 233, 200, .08), transparent 42%),
        var(--hero-kumiko-svg);
    background-size: auto, auto, 82px 82px;
    background-position: 0 0, center top, center;
    background-repeat: no-repeat, no-repeat, repeat;
    backdrop-filter: blur(0.8px);
}

.page-header .header-frame::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 16px;
    height: 16px;
    border-top: 2px solid var(--shu);
    border-left: 2px solid var(--shu);
}

.page-header .header-frame::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-bottom: 2px solid var(--shu);
    border-right: 2px solid var(--shu);
}

.page-header h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 0.82rem;
    color: rgba(240, 232, 216, .35);
}

/* ============================
   ABOUT SECTION
   ============================ */
.section {
    padding: 48px 0;
}

.section+.section {
    border-top: 1px dashed var(--kabe);
}

.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 48px;
}

.about-text {
    font-size: 0.92rem;
    color: var(--cha);
    line-height: 1.85;
    text-align: justify;
    text-align-last: left;
    hyphens: auto;
}

@keyframes topbar-seal-imprint {

    0%,
    58%,
    100% {
        transform: scale(1);
        box-shadow:
            inset 0 0 0 1px rgba(191, 59, 44, .18),
            0 2px 8px rgba(0, 0, 0, .16),
            0 0 0 0 rgba(191, 59, 44, 0);
        filter: saturate(1) brightness(1);
    }

    8% {
        transform: scale(.93);
        box-shadow:
            inset 0 0 0 1px rgba(191, 59, 44, .26),
            0 1px 5px rgba(0, 0, 0, .14),
            0 0 0 0 rgba(191, 59, 44, 0);
        filter: saturate(1.05) brightness(1.02);
    }

    14% {
        transform: scale(1.06);
        box-shadow:
            inset 0 0 0 1px rgba(191, 59, 44, .3),
            0 4px 10px rgba(143, 42, 30, .2),
            0 0 0 6px rgba(191, 59, 44, .08);
        filter: saturate(1.12) brightness(1.05);
    }

    22% {
        transform: scale(1.015);
        box-shadow:
            inset 0 0 0 1px rgba(191, 59, 44, .24),
            0 3px 9px rgba(143, 42, 30, .16),
            0 0 0 10px rgba(191, 59, 44, 0);
        filter: saturate(1.04) brightness(1.01);
    }

    30% {
        transform: scale(.985);
        box-shadow:
            inset 0 0 0 1px rgba(191, 59, 44, .2),
            0 2px 7px rgba(0, 0, 0, .16),
            0 0 0 0 rgba(191, 59, 44, 0);
        filter: saturate(1) brightness(1);
    }
}

.about-text p {
    margin-bottom: 14px;
}

.about-text strong {
    color: var(--kuro);
    font-weight: 600;
}

/* retro "index card" sidebar */
.card-block {
    background: var(--cream-hot);
    border: 1px solid var(--kabe);
    padding: 20px 22px 16px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 3px 3px 0 var(--kabe);
}

.card-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg,
            var(--shu) 0, var(--shu) 4px,
            transparent 4px, transparent 8px);
}

.card-title {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--shu);
    margin-bottom: 12px;
}

.card-block li {
    padding: 4px 0;
    font-size: 0.83rem;
    color: var(--cha);
    border-bottom: 1px dotted var(--kabe);
}

.card-block li:last-child {
    border-bottom: none;
}

.card-block li strong {
    display: block;
    color: var(--kuro);
    font-weight: 500;
}

.card-block li span {
    font-size: 0.75rem;
    color: rgba(92, 74, 58, .55);
}

/* ============================
   AFFILIATIONS
   ============================ */
.affiliations {
    padding: 22px 0;
    border-top: 1px dashed var(--kabe);
    border-bottom: 1px dashed var(--kabe);
    background: rgba(191, 59, 44, .025);
}

.affiliations-label {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--cha);
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.65;
}

.affiliations-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.affiliation-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 40px;
    opacity: 0.6;
    transition: opacity .25s;
}

.affiliation-logo:hover {
    opacity: 1;
}

.affiliation-img {
    height: 90px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    filter: sepia(.55) saturate(.5) brightness(.78) contrast(1.08);
    transition: filter .25s;
}

.affiliation-logo:hover .affiliation-img {
    filter: sepia(.1) saturate(.9) brightness(1);
}

.affiliation-sep {
    width: 1px;
    height: 30px;
    background: rgba(92, 74, 58, .28);
    flex-shrink: 0;
}

/* project partner logos */
.project-logos {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 16px 0 12px;
    padding: 12px 0;
    border-top: 1px dashed var(--kabe);
}

.project-logos-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cha);
    opacity: 0.6;
    flex-basis: 100%;
    margin-bottom: 4px;
}

.project-logo-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    min-height: 68px;
    border: 1px solid rgba(92, 74, 58, .1);
    background: rgba(240, 232, 216, .4);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.project-logo-img {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: sepia(.5) saturate(.5) brightness(.8) contrast(1.05);
    transition: filter .25s;
}

.project-logo-link:hover .project-logo-img {
    filter: sepia(.1) saturate(.9) brightness(1);
}

.project-logo-link:hover {
    border-color: rgba(191, 59, 44, .28);
    background: rgba(247, 233, 200, .6);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ============================
   RESEARCH AREAS -- ticket style
   ============================ */
.areas-section {
    padding: 48px 0;
    background: var(--washi);
    position: relative;
}

/* halftone dot border top */
.areas-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(90deg,
            var(--shu) 0, var(--shu) 2px,
            transparent 2px, transparent 6px);
    opacity: 0.25;
}

.section-heading {
    font-family: var(--font-title);
    font-size: 1.4rem;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-heading::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--shu);
    border-radius: 50%;
    flex-shrink: 0;
}

.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--kabe);
}

.areas-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.area-card {
    background: var(--kinari);
    border: 1px solid var(--kabe);
    padding: 24px 22px;
    position: relative;
    transition: transform .2s, box-shadow .2s;
}

.area-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--kabe);
}

.area-num {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--shu);
    opacity: 0.1;
    line-height: 1;
    position: absolute;
    top: 12px;
    right: 16px;
    user-select: none;
}

.area-card h3 {
    font-family: var(--font-title);
    font-size: 0.92rem;
    font-weight: 400;
    margin-bottom: 6px;
    line-height: 1.3;
    padding-right: 40px;
}

.area-card p {
    font-size: 0.78rem;
    color: var(--cha);
    line-height: 1.6;
}

/* perforated edge effect */
.area-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: repeating-linear-gradient(90deg,
            var(--kabe) 0, var(--kabe) 4px,
            transparent 4px, transparent 8px);
}

/* ============================
   HIGHLIGHTS (pub preview)
   ============================ */
.hl-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px dotted var(--kabe);
}

.hl-item:last-child {
    border-bottom: none;
}

.hl-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
}

.hl-label .hl-type {
    color: var(--shu);
    display: block;
}

.hl-label .hl-rank {
    color: var(--ai);
    display: block;
    margin-top: 2px;
}

.hl-item h3 {
    font-family: var(--font-title);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 3px;
}

.hl-item .hl-authors {
    font-size: 0.78rem;
    color: var(--cha);
}

.hl-item .hl-venue {
    font-size: 0.78rem;
    color: var(--shu);
    font-style: italic;
}

/* more link */
.more-link {
    text-align: center;
    padding: 20px 0 0;
}

.more-link a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--cha);
    padding: 6px 16px;
    border: 1px dashed var(--kabe);
    transition: all .2s;
}

.more-link a:hover {
    border-color: var(--shu);
    color: var(--shu);
    text-decoration: none;
}

/* ============================
   SOCIAL ROW
   ============================ */
.social-row {
    padding: 32px 0;
    background: var(--washi);
    border-top: 1px dashed var(--kabe);
}

.social-flex {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cha);
    padding: 7px 14px;
    border: 1px solid var(--kabe);
    background: var(--kinari);
    transition: all .2s;
}

.social-pill:hover {
    border-color: var(--shu);
    color: var(--shu);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--kabe);
    text-decoration: none;
}

.social-pill svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: block;
}

/* ============================
   PUBLICATIONS PAGE
   ============================ */
.pub-content {
    padding: 48px 0;
}

.pub-filters {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--kabe);
}

.pub-filter {
    padding: 8px 16px;
    border: none;
    background: none;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cha);
    cursor: pointer;
    position: relative;
    transition: color .2s;
}

.pub-filter:hover {
    color: var(--kuro);
}

.pub-filter.active {
    color: var(--shu);
    background: var(--shu-faded);
}

.pub-filter.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--shu);
}

.pub-year-heading {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--kabe);
    margin-top: 36px;
    margin-bottom: 12px;
    user-select: none;
    position: relative;
    padding-left: 16px;
}

.pub-year-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--shu);
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.pub-entry {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    padding: 14px 12px;
    border-bottom: 1px dotted var(--kabe);
    transition: all .2s;
    margin: 0 -12px;
}

.pub-entry:hover {
    background: var(--shu-faded);
}

.pub-entry.hidden {
    display: none;
}

.pub-badge-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
    min-width: 82px;
}

.badge {
    display: inline-block;
    padding: 2px 7px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    border: 1px solid;
}

.badge-q1 {
    border-color: var(--matcha);
    color: var(--matcha);
    background: rgba(90, 115, 85, .08);
}

.badge-core-a {
    border-color: var(--ai);
    color: var(--ai);
    background: var(--ai-faded);
}

.badge-core-b {
    border-color: var(--karashi);
    color: var(--karashi);
    background: rgba(181, 135, 15, .08);
}

.badge-best {
    border-color: var(--shu);
    color: var(--shu);
    background: var(--shu-faded);
}

.badge-thesis {
    border-color: var(--cha);
    color: var(--cha);
    background: rgba(92, 74, 58, .08);
}

.badge-prize {
    border-color: var(--matcha);
    color: #fff;
    background: var(--matcha);
}

.badge-keynote {
    border-color: var(--ai);
    color: #fff;
    background: var(--ai);
}

.pub-year-heading.hidden {
    display: none;
}

.pub-entry h3 {
    font-family: var(--font-title);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 2px;
}

.pub-entry .pub-authors {
    font-size: 0.76rem;
    color: var(--cha);
}

.pub-entry .pub-venue {
    font-size: 0.76rem;
    color: var(--shu);
    font-style: italic;
}

/* ============================
   PROJECTS PAGE
   ============================ */
.projects-content {
    padding: 48px 0;
}

.software-content {
    padding: 48px 0 56px;
}

.research-section {
    margin-bottom: 42px;
}

.research-section-bottom {
    margin-top: 42px;
    margin-bottom: 0;
}

.research-section .section-heading {
    margin-bottom: 20px;
}

.project-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px solid var(--kabe);
    position: relative;
}

.project-item:first-child {
    padding-top: 0;
}

.project-item::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--shu-faded);
}

.project-item:hover::before {
    background: var(--shu);
    opacity: 0.3;
}

.project-date {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--cha);
}

.project-status {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--matcha);
    margin-top: 4px;
}

.project-status.ended {
    color: var(--cha);
    opacity: .4;
}

.project-status.online {
    color: var(--matcha);
}

.project-status.local {
    color: var(--ai);
}

.project-status.soon {
    color: var(--karashi);
}

.project-body h3 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.project-body p {
    font-size: 0.86rem;
    color: var(--cha);
    line-height: 1.7;
    margin-bottom: 10px;
    text-align: justify;
}

.project-subtitle {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--shu);
    margin-bottom: 10px;
}

.project-detail {
    margin: 14px 0;
    padding: 14px 16px;
    background: var(--washi);
    border-left: 3px solid var(--shu);
}

.project-detail-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shu);
    margin-bottom: 8px;
}

.project-detail ul {
    list-style: disc;
    padding-left: 18px;
}

.project-detail li {
    font-size: 0.82rem;
    color: var(--cha);
    line-height: 1.65;
    margin-bottom: 6px;
    text-align: justify;
}

.project-detail li strong {
    color: var(--kuro);
    font-weight: 500;
}

.project-detail p {
    font-size: 0.82rem;
    color: var(--cha);
    line-height: 1.65;
    text-align: justify;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.software-intro {
    max-width: 760px;
    font-size: 0.86rem;
    color: var(--cha);
    line-height: 1.8;
}

.software-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.software-preview {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: inline-block;
    margin: 16px 0 8px;
    width: min(100%, 680px);
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(248, 241, 224, .96), rgba(228, 217, 195, .92)),
        var(--hero-kumiko-svg);
    background-size: auto, 92px 92px;
    background-position: 0 0, center;
    border: 1px solid rgba(92, 74, 58, .18);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .38),
        0 10px 26px rgba(28, 23, 20, .08),
        6px 6px 0 rgba(212, 201, 178, .92);
}

.software-preview::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(191, 59, 44, .16);
    pointer-events: none;
    z-index: 1;
}

.software-preview img {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(92, 74, 58, .22);
    background: rgba(240, 232, 216, .6);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .22),
        0 3px 12px rgba(28, 23, 20, .08);
}

.software-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid var(--kabe);
    background: rgba(240, 232, 216, .45);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: var(--cha);
}

.software-link:hover {
    border-color: var(--shu);
    color: var(--shu);
    text-decoration: none;
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--kabe);
}

.software-link.disabled,
.software-link.disabled:hover {
    border-style: dashed;
    color: rgba(92, 74, 58, .65);
    background: rgba(212, 201, 178, .24);
    box-shadow: none;
    transform: none;
    cursor: default;
    text-decoration: none;
}

.ptag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border: 1px solid var(--kabe);
    color: var(--cha);
    background: var(--washi);
    transition: all .15s;
}

.ptag:hover {
    border-color: var(--shu);
    color: var(--shu);
}

/* ====================================================
   SOFTWARE PAGE -- SHOWA CATALOG  昭和ソフトウェア目録
   ==================================================== */

/* Header supplement */
.soft-page-header .header-frame {
    border-color: rgba(46, 94, 120, .22);
}

.soft-header-catalog-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--ai);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
    border-bottom: 1px solid rgba(46, 94, 120, .35);
    padding-bottom: 6px;
}

/* Catalog intro row */
.soft-catalog-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--kuro);
    position: relative;
}

.soft-catalog-intro::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--kabe);
}

.soft-catalog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.soft-catalog-label-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--kinari);
    background: var(--kuro);
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.soft-catalog-rule {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        var(--kuro) 0,
        var(--kuro) 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: .4;
}

/* ---- Grid ---- */
.soft-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    align-items: start;
}

/* ---- Card ---- */
.soft-card {
    position: relative;
    background: var(--kinari);
    border: 2px solid var(--kuro);
    box-shadow: 5px 5px 0 var(--shu);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}

.soft-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--shu);
}

/* Wide card spans both columns */
.soft-card--wide {
    grid-column: 1 / -1;
}

/* Diagonal stripe accent */
.soft-card-accent {
    height: 6px;
    flex-shrink: 0;
    background: repeating-linear-gradient(
        -45deg,
        var(--shu) 0,
        var(--shu) 5px,
        var(--shu-dark) 5px,
        var(--shu-dark) 10px
    );
}

.soft-card-accent--ai {
    background: repeating-linear-gradient(
        -45deg,
        var(--ai) 0,
        var(--ai) 5px,
        #1e3f52 5px,
        #1e3f52 10px
    );
}

.soft-card-accent--matcha {
    background: repeating-linear-gradient(
        -45deg,
        var(--matcha) 0,
        var(--matcha) 5px,
        #3b5238 5px,
        #3b5238 10px
    );
}

/* Card header: number + type/status */
.soft-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 14px 8px;
    background: var(--washi);
    border-bottom: 1px solid var(--kabe);
}

.soft-card-num {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
    color: rgba(28, 23, 20, .1);
    user-select: none;
}

.soft-card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 2px;
}

.soft-kind-badge {
    font-family: var(--font-mono);
    font-size: 0.57rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 8px;
    background: var(--sumi);
    color: var(--kinari);
}

.soft-status-badge {
    font-family: var(--font-mono);
    font-size: 0.53rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1px 6px;
    border: 1px solid;
}

.soft-status-badge.soon {
    border-color: var(--karashi);
    color: var(--karashi);
}

.soft-status-badge.ended {
    border-color: rgba(92, 74, 58, .4);
    color: rgba(92, 74, 58, .45);
}

.soft-status-badge.online {
    border-color: var(--matcha);
    color: var(--matcha);
}

/* === Retro TV Bezel === */
.soft-screen-wrap {
    background: linear-gradient(158deg, #3d3028 0%, #28201a 50%, #1c1410 100%);
    padding: 18px 18px 0;
    border-bottom: 3px solid #080605;
    position: relative;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, .05),
        inset -1px -1px 0 rgba(0, 0, 0, .45);
}

/* Top bezel highlight (plastic sheen) */
.soft-screen-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .08), transparent);
    pointer-events: none;
    z-index: 0;
}

/* Control panel strip with brand label, knobs, LED */
.soft-screen-wrap::after {
    content: 'NATIONAL  TH·20A';
    display: block;
    height: 40px;
    line-height: 40px;
    padding: 0 62px 0 14px;
    background:
        /* Power LED glow */
        radial-gradient(circle, rgba(220, 50, 10, .65), transparent 68%) calc(100% - 14px) 50% / 18px 18px no-repeat,
        /* Power LED core */
        radial-gradient(circle, #cc2200, #881100 42%, transparent 58%) calc(100% - 14px) 50% / 9px 9px no-repeat,
        /* Knob 1 */
        radial-gradient(circle at 38% 32%, #40301e, #1a1208 58%) calc(100% - 36px) 50% / 15px 15px no-repeat,
        /* Knob 1 rim */
        radial-gradient(circle, transparent 43%, rgba(255, 255, 255, .06) 44%, rgba(255, 255, 255, .06) 50%, transparent 51%) calc(100% - 36px) 50% / 17px 17px no-repeat,
        /* Knob 2 */
        radial-gradient(circle at 38% 32%, #40301e, #1a1208 58%) calc(100% - 58px) 50% / 15px 15px no-repeat,
        /* Knob 2 rim */
        radial-gradient(circle, transparent 43%, rgba(255, 255, 255, .06) 44%, rgba(255, 255, 255, .06) 50%, transparent 51%) calc(100% - 58px) 50% / 17px 17px no-repeat,
        /* Panel base */
        linear-gradient(175deg, #272018 0%, #151008 100%);
    border-top: 1px solid rgba(0, 0, 0, .6);
    font-family: var(--font-mono);
    font-size: 0.46rem;
    letter-spacing: 0.22em;
    color: rgba(200, 165, 100, .3);
}

/* Screen glass */
.soft-screen-frame {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 3px;
    border: 3px solid #0a0806;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .04),
        inset 0 0 60px rgba(0, 0, 0, .7);
}

/* Screen glass diagonal shine */
.soft-screen-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Vignette */
        radial-gradient(ellipse at 50% 50%, transparent 42%, rgba(0, 0, 0, .68) 100%),
        /* Diagonal shine (top-left corner) */
        linear-gradient(135deg, rgba(255, 255, 255, .045) 0%, transparent 40%);
    pointer-events: none;
    z-index: 3;
    transition: background .3s ease;
}

/* Phosphor glow on hover (added to vignette) */
.soft-card:hover .soft-screen-frame::before {
    background:
        radial-gradient(ellipse at 50% 42%, rgba(46, 94, 120, .22), transparent 58%),
        radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(0, 0, 0, .54) 100%),
        linear-gradient(135deg, rgba(255, 255, 255, .04) 0%, transparent 40%);
}

/* Scanlines */
.soft-screen-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, .13) 3px,
        rgba(0, 0, 0, .13) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.soft-screen-frame img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 0;
    filter: contrast(1.05) brightness(0.88) saturate(0.85);
    transition: filter .25s ease;
}

.soft-card:hover .soft-screen-frame img {
    filter: contrast(1.07) brightness(0.95) saturate(0.9);
}

/* Card body */
.soft-card-body {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.soft-card-title {
    font-family: var(--font-title);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--kuro);
    margin-bottom: 5px;
    line-height: 1.25;
}

.soft-card-sub {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    color: var(--shu);
    margin-bottom: 10px;
    line-height: 1.6;
}

.soft-card-desc {
    font-size: 0.83rem;
    color: var(--cha);
    line-height: 1.72;
    flex: 1;
    margin-bottom: 0;
}

/* Tags + action at bottom */
.soft-card-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--kabe);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Wide card inner layout (screen + body side by side) */
.soft-card-wide-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.soft-card-wide-inner .soft-screen-wrap {
    border-bottom: none;
    border-right: 3px solid #080605;
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .soft-grid {
        grid-template-columns: 1fr;
    }

    .soft-card--wide {
        grid-column: auto;
    }

    .soft-card-wide-inner {
        grid-template-columns: 1fr;
    }

    .soft-card-wide-inner .soft-screen-wrap {
        border-right: none;
        border-bottom: 3px solid #080605;
    }
}

/* ============================
   ENCADREMENT PAGE
   ============================ */
.encadrement-content {
    padding: 48px 0;
}

.enc-section {
    margin-bottom: 48px;
}

.enc-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--kabe);
}

.enc-item:last-child {
    border-bottom: none;
}

.enc-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cha);
}

.enc-date {
    margin-top: 8px;
}

.enc-duration {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 2px;
}

.enc-type-badge {
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid;
    white-space: nowrap;
}

.badge-enc-these {
    border-color: var(--shu);
    color: var(--shu);
    background: var(--shu-faded);
}

.badge-enc-stage {
    border-color: var(--ai);
    color: var(--ai);
    background: var(--ai-faded);
}

.badge-enc-projet {
    border-color: var(--karashi);
    color: var(--karashi);
    background: rgba(181, 135, 15, .08);
}

.enc-body h3 {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 6px;
}

.enc-context {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    color: var(--shu);
    margin-bottom: 10px;
}

/* ============================
   TEACHING PAGE
   ============================ */
.teaching-content {
    padding: 48px 0;
}

.teaching-block {
    margin-bottom: 48px;
}

.teaching-block h2 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px double var(--cha);
}

.teach-context {
    font-size: 0.82rem;
    color: var(--cha);
    margin-bottom: 14px;
}

.teach-context a {
    color: var(--shu);
}

.course-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px dotted var(--kabe);
    align-items: baseline;
    transition: background .2s;
}

.course-row:last-child {
    border-bottom: none;
}

.course-row:hover {
    background: var(--shu-faded);
}

.course-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.course-code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--shu);
    font-weight: 500;
}

.course-level-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ai);
    border: 1px solid var(--ai);
    padding: 1px 6px;
    white-space: nowrap;
}

.course-body h3 {
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.course-body h3 a {
    color: var(--shu);
}

.course-context-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 4px;
    font-size: 0.72rem;
    color: var(--cha);
}

.course-year-chip {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shu);
    border: 1px solid rgba(130, 76, 53, 0.25);
    padding: 2px 6px;
    background: rgba(247, 233, 200, 0.45);
    white-space: nowrap;
}

.course-context-sep {
    opacity: 0.45;
}

.course-institution {
    font-size: 0.74rem;
    color: var(--cha);
    font-style: italic;
    margin-bottom: 2px;
}

.course-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 0.74rem;
    color: var(--cha);
}

.course-resp {
    color: var(--ai);
    font-weight: 500;
}

.teach-year-heading {
    font-family: var(--font-title);
    font-size: 0.95rem;
    color: var(--sumi);
    margin: 32px 0 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--kabe);
}

.sup-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px dotted var(--kabe);
}

.sup-item:last-child {
    border-bottom: none;
}

.sup-type {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--shu);
    padding-top: 2px;
}

.sup-info h4 {
    font-size: 0.86rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.sup-info p {
    font-size: 0.8rem;
    color: var(--cha);
}

/* ============================
   RESPONSABILITES PAGE
   ============================ */
.resp-content {
    padding: 48px 0;
}

.resp-section {
    margin-bottom: 48px;
}

.resp-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px dotted var(--kabe);
}

.resp-item:last-child {
    border-bottom: none;
}

.resp-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resp-date {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--cha);
}

.resp-type-badge {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    white-space: nowrap;
    display: inline-block;
    width: fit-content;
}

.badge-resp-mission {
    color: var(--ai);
    border: 1px solid var(--ai);
}

.badge-resp-comite {
    color: var(--shu);
    border: 1px solid var(--shu);
}

.resp-body h3 {
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.resp-body p {
    font-size: 0.8rem;
    color: var(--cha);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.skill-card {
    background: var(--washi);
    padding: 20px 22px;
    border-left: 3px solid var(--shu);
}

.skill-card h3 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--shu);
    margin-bottom: 12px;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    font-size: 0.8rem;
    padding: 3px 0;
    border-bottom: 1px dotted var(--kabe);
    color: var(--kuro);
}

.skill-card li:last-child {
    border-bottom: none;
}

.skill-card li strong {
    color: var(--sumi);
}

.themes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.theme-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 8px 16px;
    background: var(--sumi);
    color: var(--kinari);
    border-left: 3px solid var(--shu);
}

/* ============================
   CONTACT PAGE
   ============================ */
.contact-content {
    padding: 48px 0 56px;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 28px;
    align-items: start;
}

.contact-stack {
    display: grid;
    gap: 18px;
}

.contact-panel {
    margin-bottom: 0;
}

.contact-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shu);
}

.contact-panel h2 {
    font-family: var(--font-title);
    font-size: 1.34rem;
    color: var(--sumi);
    margin-bottom: 10px;
}

.contact-panel p {
    font-size: 0.84rem;
    color: var(--cha);
    line-height: 1.8;
}

.contact-panel p+p {
    margin-top: 12px;
}

.contact-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.contact-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px dotted var(--kabe);
}

.contact-item:first-child {
    border-top: none;
    padding-top: 0;
}

.contact-label {
    padding-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--shu);
}

.contact-value {
    font-size: 0.84rem;
    color: var(--kuro);
    line-height: 1.75;
}

.contact-value strong {
    display: block;
    margin-bottom: 2px;
    color: var(--sumi);
}

.contact-mail-list {
    display: grid;
    gap: 8px;
}

.contact-mail-list a {
    width: fit-content;
    color: var(--sumi);
}

.contact-note {
    margin-top: 18px;
    padding: 14px 16px;
    background: rgba(46, 94, 120, .06);
    border-left: 3px solid var(--ai);
    font-size: 0.76rem;
    color: var(--cha);
    line-height: 1.8;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.contact-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid var(--kabe);
    background: rgba(240, 232, 216, .45);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: var(--cha);
}

.contact-action:hover {
    border-color: var(--shu);
    color: var(--shu);
    text-decoration: none;
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--kabe);
}

.contact-bullets {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.contact-bullets li {
    position: relative;
    padding-left: 16px;
    font-size: 0.8rem;
    color: var(--cha);
    line-height: 1.7;
}

.contact-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--shu);
    opacity: 0.8;
}

.contact-map-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    background: linear-gradient(180deg, rgba(212, 201, 178, .28), rgba(240, 232, 216, .92));
    border: 1px solid rgba(92, 74, 58, .18);
    box-shadow: 4px 4px 0 var(--kabe);
}

.contact-map-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(191, 59, 44, .14);
    pointer-events: none;
}

.contact-map-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top right, rgba(191, 59, 44, .12), rgba(191, 59, 44, 0) 70%);
    pointer-events: none;
}

.contact-map-top,
.contact-map-caption {
    position: relative;
    z-index: 1;
}

.contact-map-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.contact-map-badge {
    display: inline-block;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shu);
}

.contact-map-top h2 {
    font-family: var(--font-title);
    font-size: 1.42rem;
    color: var(--sumi);
    line-height: 1.1;
}

.contact-map-meta {
    padding-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    color: var(--cha);
}

.contact-mini-map {
    position: relative;
    overflow: hidden;
    aspect-ratio: 31 / 23;
    border: 1px solid var(--kabe);
    background: #ece2cd;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
    isolation: isolate;
}

.contact-mini-map::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(92, 74, 58, .04) 1px, transparent 1px),
        linear-gradient(rgba(92, 74, 58, .04) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.65;
    z-index: 350;
    pointer-events: none;
}

.contact-mini-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(240, 232, 216, .08), rgba(46, 94, 120, .04)),
        radial-gradient(circle at top left, rgba(191, 59, 44, .12), rgba(191, 59, 44, 0) 30%),
        radial-gradient(circle at bottom right, rgba(90, 115, 85, .1), rgba(90, 115, 85, 0) 36%);
    mix-blend-mode: multiply;
    opacity: 0.75;
    z-index: 360;
    pointer-events: none;
}

.contact-leaflet-map {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.contact-leaflet-map,
.contact-leaflet-map .leaflet-container {
    width: 100%;
    height: 100%;
}

.contact-leaflet-map .leaflet-container {
    background: #1a1a1a;
    font-family: var(--font-body);
}

.contact-leaflet-map .leaflet-tile-pane {
    filter: brightness(0.9) contrast(1.05);
}

.contact-leaflet-map .leaflet-top,
.contact-leaflet-map .leaflet-bottom {
    z-index: 500;
}

.contact-leaflet-map .leaflet-control-zoom {
    border: none;
    box-shadow: 3px 3px 0 rgba(92, 74, 58, .16);
}

.contact-leaflet-map .leaflet-bar a {
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: rgba(240, 232, 216, .95);
    color: var(--sumi);
    border-color: rgba(92, 74, 58, .18);
}

.contact-leaflet-map .leaflet-bar a:hover,
.contact-leaflet-map .leaflet-bar a:focus {
    background: var(--cream-hot);
    color: var(--shu);
}

.contact-leaflet-map .leaflet-control-attribution {
    background: rgba(240, 232, 216, .88);
    color: var(--cha);
    font-size: 0.58rem;
    padding: 2px 6px;
}

.contact-leaflet-map .leaflet-control-attribution a {
    color: var(--shu);
}

.contact-leaflet-map .leaflet-popup-content-wrapper {
    background: rgba(240, 232, 216, .96);
    color: var(--kuro);
    border-left: 3px solid var(--shu);
    border-radius: 0;
    box-shadow: 3px 3px 0 rgba(92, 74, 58, .14);
}

.contact-leaflet-map .leaflet-popup-content {
    margin: 10px 12px;
    font-size: 0.74rem;
    line-height: 1.6;
}

.contact-leaflet-map .leaflet-popup-tip {
    background: rgba(240, 232, 216, .96);
}

.contact-leaflet-map .leaflet-tooltip.contact-map-tooltip {
    background: rgba(240, 232, 216, .95);
    color: var(--sumi);
    border: 1px solid rgba(92, 74, 58, .18);
    border-left: 3px solid var(--shu);
    border-radius: 0;
    box-shadow: 2px 2px 0 rgba(92, 74, 58, .12);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    padding: 6px 8px;
}

.contact-leaflet-map .leaflet-tooltip-top.contact-map-tooltip::before {
    border-top-color: rgba(240, 232, 216, .95);
}

.contact-hanko-marker-wrap {
    background: none;
    border: none;
}

.contact-hanko-marker {
    position: relative;
    display: block;
    width: 50px;
    height: 60px;
}

.contact-hanko-marker__seal {
    position: absolute;
    left: 6px;
    top: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(191, 59, 44, .96), rgba(143, 42, 30, .94));
    border: 2px solid rgba(143, 42, 30, .95);
    box-shadow:
        inset 0 0 0 2px rgba(247, 233, 200, .12),
        0 8px 14px rgba(28, 23, 20, .18);
    color: rgba(247, 233, 200, .95);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-indent: 0.08em;
}

.contact-hanko-marker__seal::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(247, 233, 200, .18);
}

.contact-hanko-marker__stem {
    position: absolute;
    left: 24px;
    top: 38px;
    width: 2px;
    height: 9px;
    background: rgba(143, 42, 30, .72);
}

.contact-hanko-marker__dot {
    position: absolute;
    left: 19px;
    top: 46px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(191, 59, 44, .96);
    box-shadow: 0 0 0 6px rgba(191, 59, 44, .12);
}

.contact-map-compass {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 620;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(92, 74, 58, .18);
    border-radius: 50%;
    background: rgba(240, 232, 216, .75);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cha);
}

.contact-map-caption {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-top: 14px;
}

.contact-map-caption strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--sumi);
}

.contact-map-caption span {
    display: block;
    font-size: 0.76rem;
    line-height: 1.6;
    color: var(--cha);
}

.contact-map-caption a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid var(--kabe);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    color: var(--cha);
    white-space: nowrap;
}

.contact-map-caption a:hover {
    border-color: var(--shu);
    color: var(--shu);
    text-decoration: none;
}

/* ============================
   FOOTER
   ============================ */
.site-footer {
    background: var(--sumi);
    color: rgba(240, 232, 216, .25);
    padding: 24px 0;
    font-size: 0.72rem;
    border-top: 3px solid var(--shu);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(191, 59, 44, .15);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-inner a {
    color: rgba(240, 232, 216, .4);
}

.footer-inner a:hover {
    color: var(--kinari);
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ============================
   ANIMATIONS
   ============================ */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Publication staggered entrance */
.pub-entry {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .4s ease, transform .4s ease;
}

.pub-entry.pub-visible {
    opacity: 1;
    transform: translateY(0);
}

.pub-entry.hidden {
    opacity: 0 !important;
    transform: none !important;
}

.pub-year-heading {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s ease, transform .35s ease;
}

.pub-year-heading.pub-visible {
    opacity: 1;
    transform: translateY(0);
}

.pub-year-heading.hidden {
    opacity: 0 !important;
    display: none;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 920px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Compact nav on mid-size laptops ---- */
@media (max-width: 1280px) {
    .topbar-nav a {
        font-size: 0.8rem;
        padding: 0 5px;
        letter-spacing: 0;
    }

    .lang-btn {
        margin-left: 8px;
        padding: 3px 6px;
    }
}

@media (max-width: 860px) {
    .menu-btn {
        display: block;
    }

    .topbar-nav {
        position: fixed;
        top: 54px;
        left: 0;
        right: 0;
        background: var(--sumi);
        border-bottom: 2px solid var(--shu);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity .2s ease, transform .2s ease;
        /* reset compact styles */
        font-size: initial;
    }

    .topbar-nav.open {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }

    .topbar-nav a {
        font-size: 0.88rem;
        display: flex;
        align-items: center;
        height: auto;
        padding: 11px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
        border-right: 1px solid rgba(255, 255, 255, .05);
        letter-spacing: 0.01em;
    }

    .topbar-nav a.active::after {
        display: none;
    }

    .topbar-nav .lang-btn {
        grid-column: 1 / -1;
        justify-self: center;
        margin: 8px auto;
        margin-left: 0;
    }
}

@media (max-width: 700px) {
    .wrap {
        padding: 0 16px;
    }

    .topbar-name {
        max-width: calc(100% - 56px);
        gap: 8px;
    }

    .topbar-name::after {
        left: 33px;
        bottom: 12px;
    }

    .topbar-name-seal {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
        font-size: 0.56rem;
    }

    .topbar-name-roman {
        font-size: 1.02rem;
        letter-spacing: 0.02em;
    }

    .hero-frame {
        margin: 12px;
        padding: 32px 20px 28px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .eki-hanko {
        top: 14px;
        right: 14px;
        width: 46px;
        height: 46px;
    }

    .eki-hanko-text {
        font-size: 1rem;
    }

    .hero-vertical {
        display: none;
    }

    .hero-circle {
        display: none;
    }

    .hero-split {
        flex-direction: column;
        gap: 24px;
    }

    .hero-photo-wrap {
        order: -1;
    }

    .hero-photo {
        width: 140px;
        height: 170px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .areas-list {
        grid-template-columns: 1fr;
    }

    .hl-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .hl-label {
        display: flex;
        gap: 8px;
    }

    .project-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .project-logos {
        gap: 12px;
    }

    .project-logo-link {
        padding: 6px 10px;
        min-height: 56px;
    }

    .project-logo-img {
        height: 38px;
        max-width: 150px;
    }

    .pub-entry {
        grid-template-columns: 1fr;
    }

    .pub-badge-col {
        flex-direction: row;
    }

    .course-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .sup-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .enc-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .resp-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .contact-map-top,
    .contact-map-caption {
        flex-direction: column;
    }

    .contact-map-caption a {
        align-self: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .page-header .header-frame {
        margin: 12px;
        padding: 24px 16px 20px;
    }
}

/* ============================================
   DEPARTURE BOARD -- retro station display
   ============================================ */
.depboard-section {
    padding-top: 36px;
    padding-bottom: 0;
}

.depboard {
    background: #0a0a0a;
    border: 3px solid #333;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .03);
    font-family: var(--font-mono);
}

.depboard-header {
    background: linear-gradient(180deg, #1a6b1a 0%, #0f4f0f 100%);
    color: #5bff5b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #0f4f0f;
}

.depboard-header-line {
    font-weight: 600;
}

.depboard-header-dir {
    color: #fff;
    font-size: 0.6rem;
    opacity: 0.8;
}

.depboard-cols {
    display: grid;
    grid-template-columns: 100px 80px 1fr 120px 80px;
    gap: 8px;
    padding: 6px 16px;
    font-size: 0.55rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #222;
}

.depboard-rows {
    min-height: 180px;
    position: relative;
}

.depboard-row {
    display: grid;
    grid-template-columns: 100px 80px 1fr 120px 80px;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    align-items: center;
    animation: depboard-flip-in 0.4s ease-out;
}

.depboard-row.flipping {
    animation: depboard-flip-out 0.3s ease-in forwards;
}

.depboard-row .dep-type {
    font-weight: 700;
    font-size: 0.7rem;
}

.depboard-row .dep-date {
    color: #ccc;
    font-size: 0.68rem;
}

.depboard-row .dep-event {
    color: #fff;
    font-weight: 500;
}

.depboard-row .dep-event small {
    display: block;
    color: #888;
    font-size: 0.6rem;
    font-weight: 400;
    margin-top: 2px;
}

.depboard-row .dep-lieu {
    color: #ccc;
    font-size: 0.65rem;
}

.depboard-row .dep-status {
    font-weight: 600;
    font-size: 0.65rem;
    text-align: center;
    padding: 2px 6px;
    border-radius: 2px;
}

.dep-status.a-venir {
    color: #0a0a0a;
    background: #ffb347;
}

.dep-status.publie {
    color: #0a0a0a;
    background: #5bff5b;
}

.dep-status.en-cours {
    color: #fff;
    background: #4488ff;
}

/* color-coded types */
.dep-cat-pub {
    color: #5bff5b;
}

.dep-cat-conf {
    color: #ffb347;
}

.dep-cat-talk {
    color: #ff6bff;
}

.dep-cat-news {
    color: #4de4ff;
}

/* ticker at bottom */
.depboard-ticker {
    background: #111;
    border-top: 1px solid #333;
    overflow: hidden;
    height: 24px;
    position: relative;
}

.depboard-ticker-text {
    color: #ffb347;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    white-space: nowrap;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    animation: ticker-scroll 22s linear infinite;
}

@keyframes ticker-scroll {
    0% {
        left: 100%;
    }

    100% {
        left: -150%;
    }
}

@keyframes depboard-flip-in {
    0% {
        opacity: 0;
        transform: rotateX(-60deg) scaleY(0.6);
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
        transform: rotateX(0) scaleY(1);
    }
}

@keyframes depboard-flip-out {
    0% {
        opacity: 1;
        transform: rotateX(0) scaleY(1);
    }

    100% {
        opacity: 0;
        transform: rotateX(60deg) scaleY(0.6);
    }
}

/* CRT scanline overlay */
.depboard-rows::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent 0, transparent 2px,
            rgba(0, 0, 0, .15) 2px, rgba(0, 0, 0, .15) 4px);
    pointer-events: none;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {

    .hero::before,
    .hero::after,
    .eki-sign,
    .topbar-name-seal {
        animation: none;
    }
}
