/* ==================================================
   PETER'S CORNER
   V0.2
================================================== */


/* ==================================================
   VARIABLES
================================================== */

:root {

    --bg: #060910;

    --surface: #0d1420;

    --surface-light: #131d2c;

    --red: #e63946;

    --red-bright: #ff4f5e;

    --blue: #2878df;

    --text: #edf2f7;

    --muted: #91a0b5;

    --border: rgba(255, 255, 255, 0.09);

    --paper: #f3e7c6;

}


/* ==================================================
   RESET
================================================== */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    background:

        radial-gradient(
            circle at 50% -10%,
            rgba(40, 120, 223, .15),
            transparent 38%
        ),

        radial-gradient(
            circle at 10% 40%,
            rgba(230, 57, 70, .05),
            transparent 30%
        ),

        var(--bg);

    color: var(--text);

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.7;

    overflow-x: hidden;
}


/* ==================================================
   BACKGROUND WEB DECORATION
================================================== */

.web {

    position: fixed;

    width: 300px;
    height: 300px;

    pointer-events: none;

    opacity: .17;

    z-index: -1;
}


/* TOP LEFT */

.web-top-left {

    top: -100px;
    left: -100px;

    background:

        repeating-radial-gradient(
            circle at 100% 100%,
            transparent 0 25px,
            rgba(255,255,255,.25) 26px,
            transparent 27px
        ),

        linear-gradient(
            45deg,
            transparent 49.5%,
            rgba(255,255,255,.18) 50%,
            transparent 50.5%
        );

}


/* TOP RIGHT */

.web-top-right {

    top: -100px;
    right: -100px;

    transform: rotate(90deg);

    background:

        repeating-radial-gradient(
            circle at 0 100%,
            transparent 0 25px,
            rgba(255,255,255,.25) 26px,
            transparent 27px
        ),

        linear-gradient(
            -45deg,
            transparent 49.5%,
            rgba(255,255,255,.18) 50%,
            transparent 50.5%
        );
}


/* BOTTOM LEFT */

.web-bottom-left {

    bottom: -130px;
    left: -120px;

    transform: rotate(180deg);

    background:

        repeating-radial-gradient(
            circle at 100% 0,
            transparent 0 25px,
            rgba(255,255,255,.2) 26px,
            transparent 27px
        );
}


/* BOTTOM RIGHT */

.web-bottom-right {

    bottom: -130px;
    right: -120px;

    transform: rotate(270deg);

    background:

        repeating-radial-gradient(
            circle at 0 0,
            transparent 0 25px,
            rgba(255,255,255,.2) 26px,
            transparent 27px
        );
}


/* ==================================================
   CRAWLING SPIDER
================================================== */

.crawler {

    position: fixed;

    left: -60px;

    top: 30%;

    z-index: 20;

    pointer-events: none;

    opacity: 0;

    animation:
        spiderCrawl 20s linear infinite;
}


.spider-body {

    display: block;

    font-size: 28px;

    filter:
        drop-shadow(
            0 0 8px
            rgba(230,57,70,.5)
        );

    transform: rotate(-8deg);
}


/*
   The spider waits,
   crawls across,
   then disappears.
*/

@keyframes spiderCrawl {

    0% {

        left: -60px;

        top: 32%;

        opacity: 0;

    }

    8% {

        opacity: .8;

    }

    25% {

        left: 25%;

        top: 34%;

    }

    45% {

        left: 55%;

        top: 30%;

    }

    65% {

        left: 78%;

        top: 35%;

    }

    78% {

        opacity: .7;

    }

    88% {

        opacity: 0;

    }

    100% {

        left: 110%;

        top: 31%;

        opacity: 0;

    }

}


/* ==================================================
   SITE CONTAINER
================================================== */

.site {

    width: min(92%, 980px);

    margin: auto;

    position: relative;
}


/* ==================================================
   HEADER
================================================== */

.header {

    text-align: center;

    padding:
        80px
        20px
        45px;

    animation:
        pageEnter .8s ease both;
}


@keyframes pageEnter {

    from {

        opacity: 0;

        transform:
            translateY(15px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


.logo-spider {

    font-size: 45px;

    animation:
        floatSpider 4s ease-in-out infinite;
}


@keyframes floatSpider {

    0%, 100% {

        transform:
            translateY(0)
            rotate(-3deg);

    }

    50% {

        transform:
            translateY(-8px)
            rotate(3deg);

    }

}


.tiny-text {

    color: var(--muted);

    font-size: .75rem;

    letter-spacing: .08em;
}


.header h1 {

    margin: 8px 0;

    font-size:
        clamp(2.6rem, 8vw, 5rem);

    line-height: 1;

    letter-spacing: -.05em;

    text-shadow:
        0 0 35px
        rgba(230,57,70,.15);
}


.subtitle {

    color: var(--muted);
}


/* ==================================================
   WEB LINE
================================================== */

.web-line {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    margin-top: 25px;

    color: var(--red);
}


.web-line span {

    width: 80px;

    height: 1px;

    background: var(--border);
}


/* ==================================================
   NAVIGATION
================================================== */

.nav {

    position: sticky;

    top: 8px;

    z-index: 10;

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 5px;

    padding: 7px;

    background:
        rgba(6,9,16,.78);

    border:
        1px solid var(--border);

    border-radius: 14px;

    backdrop-filter:
        blur(15px);

    box-shadow:
        0 10px 30px
        rgba(0,0,0,.15);
}


.nav a {

    color: var(--muted);

    text-decoration: none;

    padding:
        9px
        13px;

    border-radius: 9px;

    transition:
        .2s ease;
}


.nav a:hover {

    color: white;

    background:
        rgba(230,57,70,.12);

    transform:
        translateY(-1px);
}


/* ==================================================
   HERO
================================================== */

.hero {

    margin-top: 35px;

    display: grid;

    grid-template-columns:
        1fr
        220px;

    gap: 25px;

    padding: 35px;

    background:

        linear-gradient(
            135deg,
            rgba(230,57,70,.09),
            rgba(40,120,223,.07)
        ),

        var(--surface);

    border:
        1px solid var(--border);

    border-radius: 22px;

    box-shadow:
        0 20px 70px
        rgba(0,0,0,.25);

    animation:
        pageEnter .8s .1s ease both;
}


.eyebrow {

    color: var(--red-bright);

    font-size: .75rem;

    font-weight: 700;

    letter-spacing: .12em;
}


.hero h2 {

    font-size:
        clamp(2rem, 5vw, 3.5rem);

    line-height: 1.1;

    margin:
        10px
        0
        20px;
}


.red {

    color: var(--red-bright);
}


.hero p {

    color: var(--muted);

    max-width: 650px;
}


/* ==================================================
   BUTTONS
================================================== */

.buttons {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 25px;
}


.button {

    text-decoration: none;

    padding:
        11px
        17px;

    border-radius: 10px;

    transition:
        .2s ease;
}


.primary {

    color: white;

    background:
        var(--red);

    box-shadow:
        0 8px 25px
        rgba(230,57,70,.15);
}


.primary:hover {

    transform:
        translateY(-2px);

    background:
        var(--red-bright);

    box-shadow:
        0 10px 30px
        rgba(230,57,70,.25);
}


.secondary {

    color: white;

    border:
        1px solid var(--border);
}


.secondary:hover {

    background:
        var(--surface-light);

    transform:
        translateY(-2px);
}


/* ==================================================
   PAPER NOTE
================================================== */

.hero-note {

    position: relative;

    align-self: center;

    padding: 25px;

    background:
        var(--paper);

    color: #24201a;

    transform:
        rotate(2deg);

    box-shadow:
        0 12px 30px
        rgba(0,0,0,.3);

    transition:
        transform .25s ease;
}


.hero-note:hover {

    transform:
        rotate(0deg)
        translateY(-3px);
}


.pin {

    position: absolute;

    top: -12px;

    left: 50%;

    transform:
        translateX(-50%);
}


.hero-note p {

    color: #645b4e;

    margin: 0;
}


.hero-note strong {

    display: block;

    margin-top: 5px;
}


.hero-note small {

    color: #645b4e;
}


/* ==================================================
   SECTIONS
================================================== */

.section {

    margin-top: 90px;

    scroll-margin-top: 80px;
}


.section-heading {

    display: flex;

    align-items: baseline;

    gap: 15px;

    margin-bottom: 25px;
}


.section-heading span {

    color: var(--red);

    font-size: .8rem;

    font-weight: 700;
}


.section-heading h2 {

    margin: 0;

    font-size: 1.8rem;
}


/* ==================================================
   PETER'S DESK
================================================== */

.desk {

    padding: 25px;

    background:
        var(--surface);

    border:
        1px solid var(--border);

    border-radius: 18px;

    box-shadow:
        0 15px 50px
        rgba(0,0,0,.15);
}


.desk-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding-bottom: 20px;

    border-bottom:
        1px solid var(--border);
}


.desk-label {

    color: var(--red);

    font-size: .7rem;

    font-weight: 700;

    letter-spacing: .12em;

    margin: 0;
}


.desk-top h3 {

    margin:
        3px
        0
        0;

    font-size: 1.5rem;
}


.online-dot {

    color: #6ee787;

    font-size: .8rem;

    white-space: nowrap;
}


.desk-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 12px;

    margin-top: 20px;
}


.desk-item {

    display: flex;

    gap: 15px;

    padding: 18px;

    background:
        rgba(255,255,255,.025);

    border:
        1px solid var(--border);

    border-radius: 13px;

    transition:
        .2s ease;
}


.desk-item:hover {

    transform:
        translateY(-3px);

    border-color:
        rgba(40,120,223,.35);
}


.desk-icon {

    font-size: 25px;
}


.desk-title {

    display: block;

    color: var(--muted);

    font-size: .72rem;

    text-transform: uppercase;

    letter-spacing: .08em;
}


.desk-item strong {

    display: block;

    margin-top: 2px;
}


.desk-item small {

    display: block;

    color: var(--muted);

    font-size: .78rem;
}


/* ==================================================
   ABOUT PAPER
================================================== */

.paper {

    padding: 30px;

    background:
        var(--surface);

    border-left:
        3px solid var(--red);

    border-radius:
        0
        15px
        15px
        0;
}


.paper p {

    color: var(--muted);
}


.scribble {

    color:
        var(--red-bright) !important;

    font-family:
        cursive;

    transform:
        rotate(-1deg);
}


/* ==================================================
   PROJECTS
================================================== */

.projects {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}


.project-card {

    padding: 25px;

    background:
        var(--surface);

    border:
        1px solid var(--border);

    border-radius: 15px;

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


.project-card:hover {

    transform:
        translateY(-5px)
        rotate(-.3deg);

    border-color:
        rgba(230,57,70,.5);

    box-shadow:
        0 12px 35px
        rgba(0,0,0,.18);
}


.project-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;
}


.project-number {

    color:
        var(--red);

    font-size: .75rem;

    font-weight: bold;
}


.project-status {

    padding:
        3px
        8px;

    border-radius: 6px;

    font-size: .68rem;
}


.building {

    color:
        #ffd166;

    background:
        rgba(255,209,102,.08);
}


.webbed {

    color:
        #75b9ff;

    background:
        rgba(40,120,223,.10);
}


.abandoned-tag {

    color:
        #ff8992;

    background:
        rgba(230,57,70,.08);
}


.project-card h3 {

    margin-bottom: 8px;
}


.project-card p {

    color:
        var(--muted);

    font-size: .9rem;
}


.tag {

    display: inline-block;

    padding:
        3px
        8px;

    margin-right: 3px;

    color:
        #b7c4d6;

    background:
        var(--surface-light);

    border-radius: 6px;

    font-size: .7rem;
}


/* ==================================================
   NOTEBOOK
================================================== */

.notebook {

    position: relative;

    padding:
        30px;

    background:
        #111827;

    border:
        1px solid
        var(--border);

    border-radius: 12px;

    background-image:

        linear-gradient(
            rgba(255,255,255,.025) 1px,
            transparent 1px
        );

    background-size:
        100%
        28px;
}


.note {

    padding:
        14px
        0;

    border-bottom:
        1px dashed
        rgba(255,255,255,.08);
}


.note:last-of-type {

    border-bottom: none;
}


.note-date {

    color:
        var(--red);

    font-family:
        monospace;

    font-size: .75rem;
}


.note p {

    margin:
        3px
        0;

    color:
        #c4cfdd;
}


.notebook-footer {

    margin:
        25px
        0
        0;

    color:
        var(--muted);

    font-family:
        cursive;

    transform:
        rotate(-1deg);
}


/* ==================================================
   RANDOM
================================================== */

.random-box {

    padding:
        30px;

    text-align:
        center;

    background:

        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,.02),
            rgba(255,255,255,.02) 10px,
            transparent 10px,
            transparent 20px
        );

    border:
        1px dashed
        var(--border);

    border-radius:
        18px;
}


.random-box p {

    color:
        var(--muted);
}


button {

    padding:
        11px
        18px;

    color:
        white;

    background:
        var(--red);

    border:
        none;

    border-radius:
        9px;

    cursor:
        pointer;

    font:
        inherit;

    transition:
        .2s ease;
}


button:hover {

    transform:
        scale(1.03);

    background:
        var(--red-bright);

    box-shadow:
        0 8px 25px
        rgba(230,57,70,.2);
}


#message {

    min-height:
        28px;

    color:
        var(--red-bright) !important;

    font-weight:
        600;
}


.secret-hint {

    margin-top:
        25px;

    color:
        rgba(255,255,255,.18);

    font-size:
        .65rem;

    transition:
        .3s ease;
}


.secret-hint:hover {

    color:
        rgba(255,255,255,.5);
}


/* ==================================================
   FOOTER
================================================== */

footer {

    text-align:
        center;

    margin:
        100px
        0
        40px;

    padding-top:
        30px;

    border-top:
        1px solid
        var(--border);
}


.footer-web {

    font-size:
        25px;

    margin-bottom:
        10px;
}


footer p {

    color:
        var(--muted);

    font-size:
        .85rem;
}


footer .copyright {

    font-size:
        .7rem;
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 700px) {


    .site {

        width:
            92%;
    }


    .header {

        padding:
            55px
            10px
            35px;
    }


    .hero {

        grid-template-columns:
            1fr;

        padding:
            25px;

        gap:
            30px;
    }


    .hero-note {

        width:
            85%;

        margin:
            10px auto;
    }


    .desk-grid {

        grid-template-columns:
            1fr;
    }


    .projects {

        grid-template-columns:
            1fr;
    }


    .section {

        margin-top:
            65px;
    }


    .nav {

        top:
            5px;

        justify-content:
            flex-start;

        overflow-x:
            auto;

        flex-wrap:
            nowrap;

        scrollbar-width:
            none;

        -webkit-overflow-scrolling:
            touch;
    }


    .nav::-webkit-scrollbar {

        display:
            none;
    }


    .nav a {

        flex:
            0 0 auto;

        font-size:
            .82rem;

        padding:
            8px
            11px;
    }


    .web {

        opacity:
            .10;

        transform:
            scale(.7);
    }


    .crawler {

        display:
            none;
    }

}


/* ==================================================
   VERY SMALL PHONES
================================================== */

@media (max-width: 400px) {


    .site {

        width:
            94%;
    }


    .header h1 {

        font-size:
            2.5rem;
    }


    .hero {

        padding:
            20px;
    }


    .buttons {

        flex-direction:
            column;
    }


    .button {

        text-align:
            center;
    }


    .desk {

        padding:
            18px;
    }


    .paper {

        padding:
            22px;
    }


    .notebook {

        padding:
            22px;
    }

}


/* ==================================================
   ACCESSIBILITY
================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior:
            auto !important;

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;
    }

}