/* A few hand-written notes on the home page hero, in Mukund's own handwriting. Kept deliberately sparse. */

@font-face {
    font-family: 'Muku Hand';
    src: url('../fonts/my-handwriting.otf') format('opentype');
    font-display: swap;
}

:root {
    --hn-ink: #cfcabd;
}

body.theme-light {
    --hn-ink: #4a463f;
}

@media (prefers-color-scheme: light) {
    body:not(.theme-dark) { --hn-ink: #4a463f; }
}

.hero {
    position: relative;
}

.hn {
    font-family: 'Muku Hand', 'Bradley Hand', cursive;
    color: var(--hn-ink);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.04em;        /* the font is set wide; pull it together */
    word-spacing: 0.05em;
    white-space: nowrap;
}

.hn-arrow {
    fill: none;
    stroke: var(--hn-ink);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

/* ---- "call me Muku" beside the name ---- */
.hero .name-badge {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hn-muku {
    font-size: 23px;
    transform: rotate(-3deg) translateY(2px);
    opacity: 0.9;
}

/* ---- the tilted PC, top right of the hero, opening /nostalgic ---- */
.hn-pc {
    position: absolute;
    right: -30px;
    top: -40px;
    width: 230px;
    display: block;
    color: inherit;
    text-decoration: none;
    z-index: 2;
}

.hn-pc img {
    display: block;
    width: 210px;
    height: auto;
    margin-left: auto;
    transform: rotate(5deg);
    transform-origin: 55% 60%;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.22));
    transition: transform 0.35s cubic-bezier(.2, .8, .2, 1.2);
}

.hn-pc:hover img,
.hn-pc:focus-visible img {
    transform: rotate(1deg) scale(1.05) translateY(-3px);
}

.hn-pc:focus-visible { outline: none; }

.hn-pc-label {
    position: absolute;
    right: 100%;
    margin-right: -40px;
    top: 52px;
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    font-size: 23px;
    transform: rotate(-4deg);
}

.hn-pc-arrow {
    width: 34px;
    height: 22px;
    flex: none;
}

.hn-pc:hover .hn-pc-label,
.hn-pc:focus-visible .hn-pc-label {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

/* ---- one margin note beside the bio, like a pencilled bracket (only where the margin has room) ---- */
.bio {
    position: relative;
}

.hn-margin {
    display: none;
}

@media (min-width: 1180px) {
    .hn-margin {
        display: flex;
        align-items: center;
        gap: 14px;
        position: absolute;
        top: 2px;
        bottom: 2px;
        left: calc(100% + 26px);
    }

    .hn-margin svg {
        width: 9px;
        height: 100%;
    }

    .hn-margin .hn {
        font-size: 23px;
        line-height: 1.25;
        transform: rotate(-3deg);
    }
}

/* ---- phones: just the PC (under the intro) and "call me Muku" ---- */
@media (max-width: 700px) {
    .hn-pc {
        position: relative;
        right: auto;
        top: auto;
        width: 250px;
        margin: 1.75rem auto 0;
        padding-top: 40px;
    }

    .hn-pc img { width: 190px; margin: 0 auto; }
    /* label above the PC, arrow curving down into it */
    /* words above, the arrow dropping from under them into the monitor */
    .hn-pc-label { right: auto; left: 50%; top: 0; margin: 0; font-size: 20px; flex-direction: column; align-items: center; gap: 0; width: max-content;
        transform: translateX(-50%) rotate(-4deg); }
    .hn-pc-arrow { margin-left: -36px; transform: rotate(48deg); }
    .hn-muku { font-size: 20px; }
}

/* ======================================================================
   Notes through the rest of the page (same pencil, used sparingly)
   ====================================================================== */

/* a small inline note with a pencil arrow pointing back at what it's about */
.hn-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 12px;
    font-size: 23px;
    vertical-align: middle;
    text-transform: none;           /* headings are uppercase and letter-spaced; notes aren't */
    transform: rotate(-3deg);
    opacity: 0.92;
}

.hn-inline svg {
    width: 26px;
    height: 12px;
    flex: none;
}

/* a pencilled bracket in the right margin beside a paragraph (only where there's room) */
.hn-host {
    position: relative;
}

.hn-side {
    display: none;
}

@media (min-width: 1180px) {
    .hn-side {
        display: flex;
        align-items: center;
        gap: 14px;
        position: absolute;
        top: 2px;
        bottom: 2px;
        left: calc(100% + 26px);
    }

    .hn-side svg {
        width: 9px;
        height: 100%;
    }

    .hn-side .hn {
        font-size: 23px;
        line-height: 1.25;
        transform: rotate(-3deg);
    }
}

/* a pencil squiggle under a word */
.hn-under {
    position: relative;
    white-space: nowrap;
}

.hn-under svg {
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: -5px;
    width: calc(100% + 4px);
    height: 7px;
}

/* phones: keep only the notes marked as fine for small screens */
@media (max-width: 700px) {
    .hn-inline:not(.hn-mobile) {
        display: none;
    }

    .hn-inline {
        font-size: 20px;
    }
}

/* notes about a whole row (a project, a job, the artwork): out in the right margin on wide screens, with the
   arrow pointing back in; inline beside the row in between; hidden on phones */
.hn-row {
    position: relative;
}

.hn-inline.hn-wide-only {
    display: none;
}

@media (min-width: 1180px) {
    .hn-inline.hn-out,
    .hn-inline.hn-wide-only {
        display: inline-flex;
        position: absolute;
        left: calc(100% + 30px);
        top: 50%;
        margin: 0;
        transform: translateY(-50%) rotate(-3deg);
    }
}

@media (min-width: 1180px) {
    /* a long job entry: sit level with its title, not halfway down the description */
    .experience-item .hn-inline.hn-out {
        top: 2px;
        transform: rotate(-3deg);
    }
}
