:root{
    --cShad: #4444441a;
    --cBody: #ebe9e8;
    --cPage: #f8f8f7;
    --cText: #383B39;
    --cLine: #202020;
    --cBord: #e4e2db;
    --cMobM: rgba(255, 253, 243, 0.96);
    --cLink: #039ad6;
    --cAcn0: #ecb500;
    --cAcn1: #017de2;
    --cAcn2: #ff7010;
    --cAcn3: #d6fc02;
    --cAcn4: #ea02f1;
    --cAcn5: #0ff768;

    --radiusS: 2px;
    --radiusM: 6px;
    --radiusL: 8px;
    --pageSep: 40px;
    --pagePad: 40px;
    --menuSep: 16px;
    --minMarg: 16px;
    --padMid: 36px;
    --barWid : 60px;
    --menuWid: 200px;
    --menuHig: 560px;
    --sectSep: 25px;
    --pageWid: min(1200px, calc(100vw - var(--menuSep) - var(--menuWid) - 2 * var(--minMarg)));
    --pageLeft: calc(0.5 * (100vw - var(--pageWid) - var(--menuWid) - var(--menuSep)));
    --menuLeft: calc(var(--pageLeft) + var(--pageWid) + var(--menuSep));
    --mBPosX: 1em;
    --mBPosY: 0.5em;
}

/* This is essential to avoid a world of width-based pain */
* {box-sizing: border-box;}

@font-face {
    src: url('fonts/SofiaSans-Variable.ttf');
    font-family: 'font-regular';
    font-weight: 1 1000;
}

@font-face {
    src: url('fonts/SofiaSansSemiCondensed-Variable.ttf');
    font-family: 'font-semicond';
    font-weight: 1 1000;
}

fnw { white-space: nowrap; }
fpw { white-space: pre-wrap; }

f0 { font-family: 'font-semicond'; font-size: 4rem; font-weight: 800;}
f1 { font-family: 'font-semicond'; font-size: 4rem; font-weight: 120; line-height: 0.8;}
f2 { font-family: 'font-semicond'; font-size: 1.5rem; font-weight: 200; letter-spacing: 0.7rem; line-height: 1.2em;}
f3 { font-family: 'font-semicond'; font-size: 1.2rem; font-weight: 600;}
f4 { font-family: 'font-semicond'; font-size: 1.2rem; font-weight: 200;}
b1 { font-weight: 500;display: inline;}

html {
    scroll-behavior: smooth;
    height: 100%;
    background-color: var(--cBody);
}

body {
    width: 100vw;
    margin: 0;
    font-family: 'font-semicond';
    font-weight: 340;
    font-size: 18px;
    letter-spacing: 0.2px;
    line-height: 1.5em;
    font-feature-settings: "liga" 0;
    overflow-x: hidden;
}

html, body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.Page {
    transform-style: preserve-3d;
    position: relative;
    z-index: 2;
    width: var(--pageWid);
    background-color: var(--cPage);
    min-height: calc(1.5 * var(--pageWid));
    margin-top: var(--minMarg);
    margin-left: var(--pageLeft);
    margin-bottom: var(--pageSep);
    padding-bottom: 8px;
    border-radius: var(--radiusS);
    background: var(--cPage);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    text-align: justify;
    border-bottom: 32px solid #ebe6e0;
    overflow-x: hidden;
    opacity: 0;
    scroll-margin-top: 10px;
}

.Page.visible {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

* a, a:visited {
    text-decoration: none;
    color: var(--cLink);
}

.block{
    display: flex;
    overflow-x: hidden;
}

.head-left{
    display: flex;
    flex: 0 0 26%;
    flex-direction: column;
    justify-content: center;
    padding-right: var(--padMid);
    text-align: right;
}

.head-right{
    display: flex;
    flex: 0 0 74%;
    padding-right: var(--pagePad);
    align-items: center;
}

.page-tag {
    display: flex;
    flex: 0 0 26%;
    height: fit-content;
    background-color: color-mix(in srgb, var(--cVar) 60%, white);
    padding-top: 8px;
    padding-bottom: 8px;
    border-right: 3px solid var(--cText);
    font-size: 22px;
    font-weight: 500;
    padding-right: var(--padMid);
    justify-content: flex-end;
    text-transform: uppercase;
}

.block-left{
    display: flex;
    flex: 0 0 26%;
    flex-direction: column;
    padding: var(--sectSep) var(--padMid);
    text-align: right;
}

.block-right{
    display: flex;
    flex: 0 0 74%;
    flex-direction: column;
    padding-top: var(--sectSep);
    padding-bottom: var(--sectSep);
    padding-right: var(--pagePad);
}

.block-right p{
    margin: 0;
}

.bot-line {
    border-bottom: 2px solid var(--cLine);
    padding-bottom:  calc(var(--sectSep) + 8px);
    margin-bottom: 8px;
}


.bio-pic{
    margin-right: 30px;
    margin-left: auto;
    align-items: flex-end; 
    padding: 0px;
}

.bio-pic img {
    display: block;
    width: 100px;
    border-radius: 50px;
}


.icon-text-container{
    display: flex;
    align-items: start;
    padding: 2px;
    font-size: 16px;
    font-weight: 360;
    white-space: nowrap;
    cursor: pointer;
    gap: 24px;
    max-width: 2000px;
}

.icon-text{
    display: flex;
    gap: 8px;
    padding: 4px 0;
}


.icon-text img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.icon-text span{
    line-height: 18px;
}

.icon-text [data-lucide] {
    width: 16px;
}

.T1 {
    font-family: 'font-semicond'; 
    font-size: 1.3rem; 
    font-weight: 700;
    text-transform: uppercase;
}

.T2 { 
    font-family: 'font-semicond'; 
    font-size: 1.3rem;
    font-weight: 500;
    text-align: left;
}

.T2a {
    font-size: 1.1em;
    color: var(--cText);
    font-weight: 600;
}

.T3 { 
    font-family: 'font-semicond'; 
    font-size: 1rem; 
    font-weight: 400;
    text-align: left;
    line-height: 1em;
}

.T3a { 
    font-family: 'font-semicond'; 
    font-size: 1.1rem; 
    font-weight: 600;
    text-align: left;
    line-height: 1em;
}


p2 {
    margin-top: 1em;
}

.card {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 20px;
    align-items: center;
    border-radius: var(--radiusS);
    text-align: justify;
    background-color: white;
    border: 2px solid var(--cText);
    font-size: 0.9em;
    line-height: 1.3;
}

.card-a {
    display: flex;
    flex: 1;
    flex-direction: column;
}


.card-b {
    display: flex;
    flex: 1;
    flex-direction: column;
}


.card-fig {
    justify-content: center;
    align-items: center;
    width: 50%;
}

.card-fig img{
    max-height: 8em;
    max-width: 90%;
    object-fit: contain;
}


.tab-list{
    list-style: none;
    padding-left:  0;
    margin-top: 0;
    margin-bottom: 0;
    /* row-gap: 26px; */
}

.tab-list li {
    position: relative;
    padding-bottom: 12px;
    line-height: 1.3em;
}

/* .tab-list li::before {
    content: "\2236";
    position: absolute;
    left: -15px; 
} */

.pub-list{
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    row-gap: 0.7em;
    line-height: 1.3em;
}

.pub-head{
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.2em;
    color: var(--cVar, var(--cAcn0));
}

pub-n {
    color: var(--cVar);
    font-weight: 400;
}


.pub-more {
  display: flex;
  flex-direction: column; 
}

.pub-more[open] {
  display: flex;
  flex-direction: column;
}

.pub-more summary{
    display: inline-block;
    margin-right: calc(var(--pageWid) * 0.74);
    margin-left: var(--pagePad);
    padding: 2px var(--padMid);
    text-align: right;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 1px;
    color: var(--bVar, var(--cBul0));
    border: 1px solid  color-mix(in srgb, var(--cVar) 50%, white);
    border-radius: var(--radiusS);
}

.pub-more[open] .content {
  order: 1;
}

.pub-more[open] summary {
  order: 2;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: attr(data-closed);
}

.pub-more[open] summary::after {
  content: attr(data-open);
}

pre {
    position: relative;
    background-color: #2d2d2d;
    color: #f8f8f8;
    padding: 2px;
    border-radius: var(--radiusS);
    overflow-x: auto;
    line-height: 1.5;
    margin: 8px 0 16px 0;
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-family: 'font-semicond';
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--cText);
    background-color: var(--cPage);
    border: 1px solid var(--cBord);
    border-radius: var(--radiusS);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.copy-code-btn:hover {
    opacity: 1;
    background-color: var(--cBord);
}

.copy-code-btn.copied {
    color: var(--cVar);
    border-color: var(--cVar);
}

pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    font-size: 12px;
}

/* For inline code */
code:not(pre code) {
    background-color: var(--cBord);
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
}

#menuButton{
    display: none;
}

#mobileButton{
    display: none;
}

label[for="menuButton"] {
    position: fixed;
    z-index: 4;
    background: url('data/icon-menu-03.svg');
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    left: calc(var(--menuLeft) + 10px);
    width: 40px;
    height: 60px;
    cursor: pointer;
}

label[for="mobileButton"] {
    position: fixed;
    z-index: 4;
    background: url('data/icon-menu-03.svg');
    background-color: var(--cMobM);
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    bottom: calc(var(--mBPosY) + 5px);
    right: calc(var(--mBPosX) + 6px);
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: var(--radiusL);
    box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 20px;
    display: none;
}


.menuIcon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border-radius: var(--radiusM);
}


.Menu {
    position: fixed;
    z-index: 3;
    background-color: var(--cPage);
    box-shadow: 0 4px 15px var(--cShad);
    left: var(--menuLeft);
    top: var(--pageMrg);
    width: var(--barWid);
    height: var(--menuHig);
    padding-top: 16px;
    padding-left: 10px;
    border-radius: var(--radiusL);
    transition: width .3s ease-out; 
    font-size: 1.1rem;
    overflow: hidden; /* Necessary to prevent invisible menu */
}

.Menu:hover{
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.mSep {
    width: 24px;
    height: 2px;
    background-color: var(--cAcn0);
    border: none;
    margin: 20px 8px;
    transition: .3s ease-out;
  }

.rSep {
    width: 24px;
    height: 2px;
    background-color: var(--cAcn0);
    border: none;
    margin: 20px 0 20px auto;
  }

.menuItem {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    height: 40px;
    margin-top: 10px;
    border-radius: var(--radiusM);
    transition: .3s ease-out;
    cursor: pointer;
    width: calc(var(--menuWid) - 20px);
}

.menuHead{
    display: flex;
    height: 30px;
    margin-left: 50px;
    overflow: hidden;
    width: 0px;
    white-space: nowrap;
    transition: .3s ease-out;
}

.mobileHead{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 54px;
    height: 50px;
    margin-left: -120px;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: .3s ease-out;
}

.menuText{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
    color: var(--cText);
    transition: .3s ease-out;
}

.mobileMenu{
    position: fixed;
    z-index: 3;
    background-color: var(--cMobM);
    right: var(--mBPosX);
    bottom: var(--mBPosY);
    width: var(--menuWid);
    height: var(--menuHig);
    padding-top: 2px;
    padding-right: 20px;
    border-radius: var(--radiusL);
    transition: opacity .5s ease-out;
    box-shadow: 0 4px 15px var(--cShad);
    font-weight: 400;
    opacity: 0;
    pointer-events: none;
}

.mobileMenuIcon{
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radiusM);
    transition: .3s ease-out;
}

.mobileMenuIcon img {
    height: 22px;
    width: auto;
}

.mobileMenuText{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    margin-right: 16px;
    white-space: nowrap;
    color: var(--cText);
    transition: .3s ease-out;
}

.menuIcon:hover {
    background-color: var(--cAcn0);
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 4px;
}

.menuIcon img {
    height: 22px;
    width: auto;
}

.menuText{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    width: 0px;
    margin-left: 10px;
    white-space: nowrap;
    color: var(--cText);
    transition: .3s ease-out;
}

label[for="menuButton"]:hover ~ .Menu {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#menuButton:checked ~ .Menu{
    width: var(--menuWid);
}

#menuButton:checked ~ .Menu .menuText {
    width: calc(var(--menuWid) - var(--barWid) - 10px);
    animation: wipe 1s ease-in-out forwards;
    animation-delay: 1s;
}

#menuButton:checked ~ .Menu .menuHead{
    width: var(--menuWid);
}
    
#menuButton:checked ~ .Menu .menuItem:hover {
    background-color: var(--cAcn0);
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
}

#menuButton:checked ~ .Menu .menuIcon:hover {
    pointer-events: none;
}

.mobile-only{
    display: none;
}

@media screen and (max-width: 1000px) {
    :root{
        --pagePad: 16px;
        --minMarg: 10px;
        --pageWid: calc(100vw - 2 * var(--minMarg));
        --pageLeft: var(--minMarg);
    }

    body{
        font-weight: 350;
        font-size: 20px;
    }

    b1 {
        font-weight: 600;
        display: inline;
    }

    .Page{
        border-radius: var(--radiusL);
    }

    .Menu{
        display: none;
    }

    .menuItem {
        justify-content: flex-end;
    }


    label[for="menuButton"]{
        display: none;
    }

    label[for="mobileButton"] {
        display: unset;
    }

    #mobileButton:checked ~ label[for="mobileButton"] .mobileHead{
        opacity: 0.95;
    }

    #mobileButton:checked ~ .mobileMenu{
        display: unset;
        opacity: 1;
        pointer-events: auto;
    }

    #mobileButton:checked + label {
        box-shadow: none;
    }

    .page-tag{
        position: relative;
        border-right: none;
        padding-right: var(--pagePad);
    }

    .bio-pic{
        margin-right: 0;
    }

    .T1{
        width: fit-content;
        margin: 0;
        line-height: 1;
    }

    .T1::before {
        content: "[ ";
        font-weight: 200;
    }

    .T1::after {
        content: " ]";
        font-weight: 200;
    }

    .pc-only{
        display: none;
    }

    .mobile-only{
        display: flex;
    }

    .block{
        flex-direction: column;
        row-gap: calc( 0.6 * var(--sectSep) );
    }

    .block-left{
        flex: 1;
        text-align: left;
        padding-left: var(--pagePad);
        padding-top: var(--sectSep);
        padding-bottom: 0px;
        margin: 0;
    }

    .block-right{
        flex: 1;
        padding-left: var(--pagePad);
        padding-top: 0px;
        padding-bottom: var(--sectSep);
        margin: 0;
    }

    .head-left{
        flex: 1;
        text-align: left;
        padding-left: var(--pagePad);
    }

    .head-right{
        flex: 1;
        padding-left: var(--pagePad);
    }

    .pc-mail{
        display: none;
    }

    .column{
        margin-bottom: 0px;
    }

    .resp-column{
        flex-direction: column;
        row-gap: 16px;
    }

    .mobile-mail{
        display: flex;
    }

    .card{
        flex-direction: column;
        row-gap: 8px;
        border: unset;
        padding: 0;
        background-color: unset;
    }

    .card-a {
        width: 100%;
    }

    .card-fig{
        padding: 8px;
        background-color: white;
        border: 2px solid var(--cText);
    }

    .card-fig img {
        max-height: 10em;
        max-width: 80%;
        padding: 0;
    }

    .pub-more summary{
        margin-right: auto;
        text-align: left;
        padding-left: 10pxk;
    }
}
