/* ============================================================
   页面组件
   社交抽屉 / 小家伙纸片 / 简历大面板 / 联系卡片
   （基础颜色和布局在 style.css 里）
   ============================================================ */


/* ============================================================
   通用：一张贴了胶带的纸片
   ============================================================ */

.PaperCard {
    position: relative;
    background: var(--paper);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow);
    transform: rotate(var(--tilt, 0deg));
    transition: transform .22s ease, box-shadow .22s ease;
}

.PaperCard:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 10px 12px 0 var(--ink);
}

.PaperCard::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    z-index: 2;

    width: 88px;
    height: 26px;

    background: var(--tape, #ffd166);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 rgba(17, 17, 17, .25);
    transform: translateX(-50%) rotate(var(--tape-rot, -3deg));
}


/* ============================================================
   关于我 · 社交抽屉
   ============================================================ */

.DrawerWrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    width: 100%;
}

.Drawer {
    width: min(780px, 100%);
    transform: rotate(-.7deg);
}

/* 抽屉把手 */
.DrawerLid {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 20px 26px;

    background: var(--paper);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;

    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.DrawerLid:hover {
    background: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0 var(--ink);
}

.DrawerLid:focus-visible {
    outline: 4px dashed var(--blue);
    outline-offset: 4px;
}

.DrawerGrip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;

    background: var(--orange);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    transform: rotate(-3deg);
}

.DrawerGrip i {
    display: block;
    width: 18px;
    height: 3px;
    background: var(--ink);
}

.DrawerLabel {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.DrawerLabelMain {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
    line-height: 1.2;
}

.DrawerLabelSub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--muted);
}

.DrawerArrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;

    font-size: 24px;
    font-weight: 900;
    background: var(--butter);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);

    transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), background .2s ease;
}

.Drawer.is-open .DrawerArrow {
    background: var(--blue);
    color: var(--paper);
    transform: rotate(180deg);
}

/* 抽屉身体：用 grid 的 0fr → 1fr 做高度动画 */
.DrawerBody {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;

    transition:
        grid-template-rows .5s cubic-bezier(.22, 1, .36, 1),
        opacity .25s ease,
        visibility 0s linear .5s;
}

.Drawer.is-open .DrawerBody {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;

    transition:
        grid-template-rows .5s cubic-bezier(.22, 1, .36, 1),
        opacity .3s ease .08s,
        visibility 0s;
}

.DrawerClip {
    min-height: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.DrawerContent {
    padding: 24px 26px 26px;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-top: 0;
}

.DrawerHint {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}

.DrawerHint::before {
    content: "→ ";
    color: var(--orange);
    font-weight: 900;
}

/* 只有关掉 JavaScript 时才会出现 */
.NoScriptNote {
    margin: 0;
    padding: 8px 16px;
    background: var(--paper);
    border: 2px dashed var(--ink);
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

/* 链接列表 */
.LinkList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.LinkList > li {
    margin: 0;
}

.SocialLink {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 11px 16px;

    background: #ffffff;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 rgba(17, 17, 17, .85);
    color: var(--ink);
    text-decoration: none;

    opacity: 0;
    transform: translateY(-6px);
}

.Drawer.is-open .SocialLink {
    animation: socialIn .38s cubic-bezier(.22, 1, .36, 1) forwards;
    animation-delay: calc(var(--i, 0) * 70ms + 90ms);
}

@keyframes socialIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.SocialLink:hover {
    background: #ffffff;
    background: color-mix(in srgb, var(--brand, var(--orange)) 12%, #ffffff);
    box-shadow: 5px 5px 0 var(--ink);
}

.SocialLink:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.SocialIcon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;

    background: var(--brand, var(--ink));
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    color: var(--on-brand, #ffffff);
    font-size: 18px;
    font-weight: 900;

    transform: rotate(-3deg);
    transition: transform .18s ease;
}

.SocialLink:hover .SocialIcon {
    transform: rotate(3deg) scale(1.06);
}

.SocialText {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.SocialName {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;

    font-size: 19px;
    font-weight: 900;
    line-height: 1.3;
}

.SocialHandle {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: #7a7462;
}

.SocialDesc {
    font-size: 13px;
    line-height: 1.5;
    color: #5f5947;
}

.SocialGo {
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 900;
    transition: transform .18s ease;
}

.SocialLink:hover .SocialGo {
    transform: translate(2px, -2px);
}

/* 列表最后一行：以后还会有更多 */
.SocialMore {
    display: block;
    padding: 10px 16px;

    border: 2px dashed #b9b29a;
    background: rgba(255, 255, 255, .5);
    color: #7a7462;
    font-size: 13px;
    text-align: center;

    opacity: 0;
}

.Drawer.is-open .SocialMore {
    animation: socialIn .38s cubic-bezier(.22, 1, .36, 1) forwards;
    animation-delay: calc(var(--i, 0) * 70ms + 90ms);
}


/* ============================================================
   游戏抽屉
   ============================================================ */

/* 游戏抽屉用蓝色抓手，和橙色社交抽屉区分一下 */
#gameDrawer .DrawerGrip {
    background: var(--blue);
}

.GameItem {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;

    background: #ffffff;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 rgba(17, 17, 17, .85);

    opacity: 0;
    transform: translateY(-6px);
}

.Drawer.is-open .GameItem {
    animation: socialIn .38s cubic-bezier(.22, 1, .36, 1) forwards;
    animation-delay: calc(var(--i, 0) * 70ms + 90ms);
}

.GameItem:hover {
    box-shadow: 5px 5px 0 var(--ink);
}

.GameItem:hover .SocialIcon {
    transform: rotate(3deg) scale(1.06);
}

.GameText {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.GameName {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.GameSub {
    font-size: 12px;
    line-height: 1.5;
    color: #5f5947;
}

.GameActions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.GameLink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;

    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;

    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.GameLink--official {
    background: var(--butter);
}

.GameLink--steam {
    background: #1b2838;
    color: #ffffff;
}

.GameLink:hover {
    background: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    color: var(--paper);
    transform: translate(-1px, -1px);
}

.GameLink--steam:hover {
    background: #66c0f4;
    color: var(--ink);
}

.GameLink:focus-visible {
    outline: 3px dashed var(--blue);
    outline-offset: 3px;
}

.GameLink:active {
    box-shadow: 1px 1px 0 var(--ink);
    transform: translate(1px, 1px);
}


/* ============================================================
   小家伙 · 三块书写纸
   ============================================================ */

.PetGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 34px;
    width: min(1140px, 100%);
    align-items: stretch;
}

.PetCard {
    display: flex;
    flex-direction: column;
    padding: 30px 24px 24px;
}

.PetCard:nth-child(1) {
    --tilt: -1.4deg;
    --tape: #ffd166;
    --tape-rot: -4deg;
    --accent: var(--orange);
}

.PetCard:nth-child(2) {
    --tilt: 1.1deg;
    --tape: #ffb3c7;
    --tape-rot: 3deg;
    --accent: var(--pink);
}

.PetCard:nth-child(3) {
    --tilt: -.9deg;
    --tape: #a8d8ff;
    --tape-rot: -2deg;
    --accent: var(--blue);
}

.PetHead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.PetIndex {
    padding: 2px 8px;

    background: var(--accent, var(--orange));
    border: 2px solid var(--ink);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    transform: rotate(-4deg);
}

.PetName {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.3;
}

.PetMeta {
    margin: 0 0 16px;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--muted);
}

/* 横线纸：看起来就能直接往上写 */
.PetBody {
    flex: 1;
    min-height: 200px;
    padding: 8px 14px 14px;

    background-color: #fffdf6;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(1.9em - 1px),
        var(--paper-line) calc(1.9em - 1px),
        var(--paper-line) 1.9em
    );
    border: 2px dashed #b9b29a;

    font-size: 15px;
    line-height: 1.9em;
    color: #6b6656;
}

.PetBody p {
    margin: 0;
}

.WriteHint::before {
    content: "✎ ";
    color: var(--accent, var(--orange));
    font-weight: 900;
}


/* ============================================================
   简历 · 一整张大面板
   ============================================================ */

.ResumeSheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1020px, 100%);
    min-height: min(74vh, 820px);
    padding: clamp(30px, 5vw, 56px);

    background: var(--paper);
    border: 3px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    transform: rotate(.4deg);
}

.ResumeSheet::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 50%;
    width: 130px;
    height: 28px;

    background: #ffd166;
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 rgba(17, 17, 17, .25);
    transform: translateX(-50%) rotate(-1.5deg);
}

.ResumeHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--ink);
}

.ResumeKicker {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .35em;
    color: var(--blue);
}

.ResumeName {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.1;
}

.ResumeName small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2em;
    color: var(--muted);
}

.ResumeStamp {
    flex: 0 0 auto;
    padding: 8px 14px;

    border: 3px solid var(--pink);
    border-radius: 6px;
    color: var(--pink);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .2em;
    transform: rotate(6deg);
    opacity: .9;
}

.ResumeBody {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-top: 24px;
}

/* 真正留给简历内容的地方 */
.ResumeBlank {
    flex: 1;
    display: grid;
    place-content: center;
    gap: 10px;
    min-height: 300px;
    padding: 32px;

    background-color: #fffdf6;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(2.1em - 1px),
        var(--paper-line) calc(2.1em - 1px),
        var(--paper-line) 2.1em
    );
    border: 2px dashed #b9b29a;
    text-align: center;
    color: #7a7462;
}

.ResumeBlank::before {
    content: "✎";
    font-size: 36px;
    line-height: 1;
    color: var(--blue);
}

.ResumeEmpty {
    margin: 0;
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 800;
    line-height: 1.6;
    color: #5f5947;
}

.ResumeEmptySub {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

.ResumeFoot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    padding-top: 14px;

    border-top: 2px solid #d8d0b8;
    font-size: 11px;
    letter-spacing: .18em;
    color: #8a8370;
}


/* ============================================================
   联系我 · 邮箱卡片
   ============================================================ */

.ContactCard {
    position: relative;
    width: min(640px, 100%);
    padding: clamp(32px, 5vw, 48px) clamp(22px, 5vw, 48px) clamp(26px, 4vw, 36px);

    background: var(--paper);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow);
    text-align: center;
    transform: rotate(-.8deg);
}

/* 右上角的小红星，和主页那只玩偶头上的星星呼应 */
.ContactCard::after {
    content: "★";
    position: absolute;
    top: -26px;
    right: -18px;

    font-size: 44px;
    line-height: 1;
    color: var(--red);
    text-shadow: 2px 2px 0 var(--ink);
    transform: rotate(14deg);
}

.ContactKicker {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .32em;
    color: var(--blue);
}

.ContactTitle {
    margin: 0 0 18px;
    font-size: clamp(26px, 3.6vw, 36px);
    font-weight: 900;
    line-height: 1.2;
}

.MailLink {
    display: inline-block;
    max-width: 100%;
    margin: 6px 0 22px;
    padding: 8px 16px;

    border-bottom: 3px solid var(--ink);
    color: var(--ink);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: clamp(16px, 4vw, 26px);
    font-weight: 800;
    overflow-wrap: anywhere;
    text-decoration: none;

    transition: background .16s ease;
}

.MailLink:hover {
    background: var(--butter);
}

.MailLink:focus-visible {
    outline: 3px dashed var(--blue);
    outline-offset: 4px;
}

.ContactActions {
    margin-bottom: 10px;
}

.CopyMail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;

    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;

    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.CopyMail:hover {
    background: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    color: var(--paper);
    transform: translate(-1px, -1px);
}

.CopyMail:active {
    box-shadow: 1px 1px 0 var(--ink);
    transform: translate(2px, 2px);
}

.CopyMail:focus-visible {
    outline: 3px dashed var(--blue);
    outline-offset: 3px;
}

.ContactStatus {
    min-height: 1.5em;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
}

.ContactNote {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}


/* ============================================================
   组件的小屏调整
   ============================================================ */

@media (max-width: 680px) {
    .Drawer {
        transform: none;
    }

    .DrawerLid {
        gap: 12px;
        padding: 14px;
    }

    .DrawerGrip {
        padding: 4px 5px;
    }

    .DrawerGrip i {
        width: 14px;
    }

    .DrawerLabelSub {
        font-size: 9px;
        letter-spacing: .08em;
    }

    .DrawerArrow {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }

    .DrawerContent {
        padding: 18px 14px 20px;
    }

    .SocialLink {
        gap: 11px;
        padding: 10px 12px;
    }

    .SocialIcon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .SocialName {
        gap: 6px;
        font-size: 17px;
    }

    .SocialHandle {
        font-size: 11px;
    }

    .SocialDesc {
        font-size: 12px;
    }

    .SocialGo {
        font-size: 18px;
    }

    .PetGrid {
        gap: 30px;
    }

    .PetCard {
        padding: 26px 18px 20px;
    }

    .PetName {
        font-size: 21px;
    }

    .ResumeSheet {
        min-height: 0;
        padding: 24px 18px;
        box-shadow: 8px 8px 0 var(--ink);
    }

    .ResumeHead {
        flex-direction: column;
        gap: 12px;
    }

    .ResumeStamp {
        align-self: flex-end;
    }

    .ResumeBlank {
        min-height: 260px;
        padding: 24px 16px;
    }

    .ResumeFoot {
        flex-direction: column;
        gap: 4px;
    }

    .ContactCard {
        padding: 30px 18px 26px;
        transform: none;
    }

    .ContactCard::after {
        top: -20px;
        right: -6px;
        font-size: 34px;
    }

    .MailLink {
        padding: 6px 8px;
    }

    .GameItem {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }

    .GameName {
        font-size: 16px;
    }

    .GameSub {
        font-size: 11px;
    }

    .GameActions {
        width: 100%;
        padding-left: 50px;
    }

    .GameLink {
        flex: 1;
        padding: 8px 10px;
    }
}
