:root {
    --paper: #ffffff;
    --ink: #000000;
}

@keyframes pen-twitch-1 {
    0% { transform: translate(0px, 0px) rotate(-0.25deg); }
    33% { transform: translate(-0.6px, 0.4px) rotate(0.3deg); }
    66% { transform: translate(0.5px, -0.3px) rotate(-0.15deg); }
    100% { transform: translate(0px, 0px) rotate(-0.25deg); }
}

@keyframes pen-twitch-2 {
    0% { transform: translate(0px, 0px) rotate(0.3deg); }
    33% { transform: translate(0.6px, -0.5px) rotate(-0.35deg); }
    66% { transform: translate(-0.4px, 0.35px) rotate(0.2deg); }
    100% { transform: translate(0px, 0px) rotate(0.3deg); }
}

@keyframes pen-twitch-3 {
    0% { transform: translate(-0.3px, 0.25px) rotate(-0.2deg); }
    33% { transform: translate(0.5px, -0.35px) rotate(0.25deg); }
    66% { transform: translate(-0.25px, -0.4px) rotate(-0.3deg); }
    100% { transform: translate(-0.3px, 0.25px) rotate(-0.2deg); }
}



* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--paper);
}

body {
    background-color: var(--paper);
    color: var(--ink);
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Caveat', cursive, sans-serif;
    /* Clean stark paper with subtle stray ink flecks */
    background-image:
        radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    background-position: center top;
    overflow-x: hidden;
    line-height: 1.4;
}

a, button, input {
    text-decoration: none;
    color: inherit;
}


header.site-header {
    text-align: center;
    padding: 45px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-wrap {
    position: relative;
    display: inline-block;
}

h1.hero-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(4.5rem, 13vw, 8.5rem);
    font-weight: 700;
    line-height: 0.88;
    margin: 0;
    color: var(--ink);
    animation: pen-twitch-1 0.3s steps(3, end) infinite;
    position: relative;
    z-index: 2;
}

/* Frantic ghost sketch lines around title */
.title-wrap::before {
    content: "ze's site";
    position: absolute;
    top: -2px; left: -4px;
    font-family: 'Caveat', cursive;
    font-size: clamp(4.5rem, 13vw, 8.5rem);
    font-weight: 700;
    line-height: 0.88;
    color: rgba(0, 0, 0, 0.35);
    z-index: 1;
    pointer-events: none;
    animation: pen-twitch-2 0.3s steps(3, end) infinite;
}

.title-wrap::after {
    content: "ze's site";
    position: absolute;
    top: 3px; left: 3px;
    font-family: 'Caveat', cursive;
    font-size: clamp(4.5rem, 13vw, 8.5rem);
    font-weight: 700;
    line-height: 0.88;
    color: rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
    animation: pen-twitch-3 0.3s steps(3, end) infinite;
}

/* Frantic pen scratch underline with shooting slash marks */
.scribble-scratch {
    width: 290px;
    height: 22px;
    margin: 6px auto 0 auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 16' preserveAspectRatio='none'%3E%3Cpath d='M-5,8 L105,7 M-2,10 L102,6 M0,4 Q25,12 50,4 T100,10 M-8,12 L45,2 L95,14 M15,-2 L22,18 M75,-1 L68,17' fill='none' stroke='%23000000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    animation: pen-twitch-2 0.25s steps(2, end) infinite;
}

.title-mobile {
    display: none;
}

.nav {
    box-sizing: border-box;
    width: 92%;
    max-width: 750px;
    margin: 0 auto 2.2em auto;
    padding: 10px 14px;
    gap: 1.4em;
    align-items: center;
    justify-content: center;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M-2,4 L102,2 M-4,36 L104,38 M1,-4 L3,44 M99,-3 L97,43 M-1,7 L101,5 M-2,33 L102,35 M5,-2 L4,42 M95,-2 L96,42 M-5,20 L15,-2 M85,42 L105,20' fill='none' stroke='%23000000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    animation: pen-twitch-1 0.48s steps(3, end) infinite;
}

.nav a, .nav p {
    font-family: 'Caveat', cursive;
    font-size: 1.85rem;
    font-weight: 700;
    padding: 0 8px;
    margin: 0;
    transition: transform 0.15s ease;
}

.nav a:hover {
    transform: scale(1.15) rotate(-2deg);
    text-decoration: underline wavy;
}

/* MAIN TWO-COLUMN CONTAINER */
.main-container {
    box-sizing: border-box;
    padding: 0.8em;
    display: grid;
    grid-template-columns: 1fr 2.3fr;
    align-items: start;
    gap: 2.2em;
    width: 92%;
    max-width: 1050px;
    margin: auto auto 6em auto;
}

.column-cluster {
    display: flex;
    flex-direction: column;
    gap: 1.4em;
    width: 100%;
}

.column-label {
    font-family: 'Caveat', cursive;
    color: var(--ink);
    font-weight: 700;
    font-size: 2.6rem;
    text-align: center;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Spiky slash lines beside column label */
.column-label::before {
    content: "///";
    font-size: 1.4rem;
    color: var(--ink);
    letter-spacing: -2px;
}
.column-label::after {
    content: "\\\\\\";
    font-size: 1.4rem;
    color: var(--ink);
    letter-spacing: -2px;
}

.items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "projects setup"
        "about about";
    gap: 1.4em;
}

.pen-strike-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    gap: 8px;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--ink);
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    /* Fine multi-stroke pen lines with natural overshoots */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50' preserveAspectRatio='none'%3E%3Cpath d='M-6,6 L106,4 M-3,8 L103,5 M-8,44 L108,46 M-4,42 L104,43 M2,-5 L4,55 M5,-3 L3,53 M97,-6 L95,56 M94,-3 L96,53 M-10,18 L18,-8 M82,58 L110,32 M-5,38 L14,56 M88,-6 L106,12' fill='none' stroke='%23000000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    animation: pen-twitch-1 0.45s steps(3, end) infinite;
    transition: transform 0.15s ease;
}

.pen-strike-btn:nth-child(2) {
    animation-name: pen-twitch-2;
    animation-delay: -0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50' preserveAspectRatio='none'%3E%3Cpath d='M-5,4 L105,7 M-8,7 L102,9 M-4,45 L106,42 M-6,43 L104,44 M4,-6 L2,56 M1,-3 L3,53 M96,-5 L98,55 M94,-2 L95,52 M-8,30 L30,-8 M70,58 L108,20' fill='none' stroke='%23000000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pen-strike-btn:nth-child(3) {
    animation-name: pen-twitch-3;
    animation-delay: -0.22s;
}

/* Hover: Hand-inked filled contour with matching scratchy pen overshoots */
.pen-strike-btn:hover {
    background-color: transparent;
    color: #ffffff;
    /* Hand-drawn organic filled ink shape + frantic pen scratches matching the lines */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50' preserveAspectRatio='none'%3E%3Cpath d='M3,5 Q20,2 45,4 Q75,1 97,6 Q95,25 97,44 Q70,47 40,43 Q15,46 3,44 Q1,25 3,5 Z' fill='%23000000' stroke='%23000000' stroke-width='2'/%3E%3Cpath d='M-6,5 L106,4 M-4,44 L104,46 M3,-5 L4,55 M97,-6 L95,56 M-10,18 L18,-8 M82,58 L110,32 M-5,38 L14,56 M88,-6 L106,12' fill='none' stroke='%23000000' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M8,14 L92,12 M6,24 L94,22 M10,34 L90,36' fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-linecap='round' opacity='0.35'/%3E%3C/svg%3E");
    transform: scale(1.02) rotate(-0.5deg);
}

.pen-strike-btn i, .pen-strike-btn svg {
    font-size: 1.25em;
    position: relative;
    z-index: 5;
}

.pen-strike-btn p {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 5;
}

/* Grid areas */
.btn-projects { grid-area: projects; }
.btn-setup { grid-area: setup; }
.btn-about { grid-area: about; }

/* (CHAOTIC PEN BORDERS) */
.projects-masonry {
    box-sizing: border-box;
    width: 92%;
    max-width: 1050px;
    margin: auto auto 6em auto;
    columns: 2;
    column-gap: 1.8em;
    padding: 0.5em;
}

.sketch-card {
    position: relative;
    box-sizing: border-box;
    color: var(--ink);
    background-color: transparent;
    padding: 1.6em;
    margin: 0 0 1.8em 0;
    width: 100%;
    text-align: left;
    display: inline-block;
    break-inside: avoid;
    /* Fine multi-stroke pen border with loose scratch overshoots */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M-4,4 L104,3 M-2,6 L102,5 M-5,96 L105,97 M-3,94 L103,95 M3,-5 L2,105 M5,-3 L4,103 M97,-4 L98,104 M95,-2 L96,102 M-8,25 L25,-8 M75,108 L108,75 M-8,85 L18,111 M82,-11 L111,18' fill='none' stroke='%23000000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    animation: pen-twitch-1 0.48s steps(3, end) infinite;
}

.sketch-card:nth-child(even) {
    animation-name: pen-twitch-2;
    animation-delay: -0.22s;
}

.card-img {
    width: 100%;
    height: auto;
    max-height: 270px;
    object-fit: cover;
    border: 1.3px solid var(--ink);
    display: block;
    margin-bottom: 0.8em;
    filter: contrast(1.15) grayscale(0.2);
}

.card-title {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.1em 0;
    color: var(--ink);
}

.card-desc {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.35rem;
    color: #222222;
    text-align: left;
    margin: 0.4em 0 0.8em 0;
    line-height: 1.4;
}

.card-links {
    display: flex;
    gap: 14px;
    align-items: center;
}

.card-links a {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--ink);
}

.card-links a:hover {
    transform: scale(1.1) rotate(-2deg);
}

/* (SETUP & ABOUT) */
.sketch-container {
    position: relative;
    background-color: transparent;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.3em;
    padding: 2.4em;
    width: 92%;
    max-width: 850px;
    margin: 0 auto 6em auto;
    /* Fine multi-line sketch frame with loose corner overshoots */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M-3,3 L103,2 M-5,5 L105,4 M-4,97 L104,98 M-6,95 L106,96 M2,-4 L3,104 M4,-2 L5,102 M98,-3 L97,103 M96,-5 L95,105 M-6,15 L15,-6 M85,106 L106,85 M-7,90 L20,117 M80,-17 L117,20' fill='none' stroke='%23000000' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    animation: pen-twitch-1 0.48s steps(3, end) infinite;
}

.sketch-container p {
    text-align: left;
    font-size: 1.55rem;
    line-height: 1.6;
    color: var(--ink);
}

.sketch-container b {
    color: #000000;
    text-decoration: underline;
}

.sketch-container a {
    color: #000000;
    font-weight: 700;
    text-decoration: underline wavy;
}

/* FIXED STICKY FOOTER*/
.stickyboi {
    box-sizing: border-box;
    padding: 0.6em 1.4em;
    color: var(--ink);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0 auto;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.94);
    border-top: 2.8px solid var(--ink);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Caveat', cursive;
    font-size: 1.45rem;
}

.stickyboi p {
    font-size: 1.45rem;
    margin: 0;
    color: var(--ink);
    text-align: center;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .title-desktop {
        display: none;
    }
    .title-mobile {
        display: block;
    }
    .main-container {
        grid-template-columns: 100%;
        gap: 1.8em;
    }
    .items-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "projects"
            "setup"
            "about";
    }
    .projects-masonry {
        columns: 1;
    }
    .nav p, .nav a {
        font-size: 1.4rem;
    }
    .stickyboi {
        flex-direction: column;
        gap: 0.2em;
        text-align: center;
    }
}

/* ── TORN SKETCH PAPER SHEET & PULL TAB ───────────────────────── */
.blog-pull-tab {
    position: fixed;
    top: 36%;
    right: 0;
    z-index: 10001;
    background: #ffffff;
    color: var(--ink);
    border: 2.2px solid var(--ink);
    border-right: none;
    padding: 10px 14px 10px 18px;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: -3px 4px 0px #000000;
    display: flex;
    align-items: center;
    gap: 8px;
    transform-origin: right center;
    animation: pen-twitch-1 0.45s steps(3, end) infinite;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s, color 0.15s;
}

.blog-pull-tab:hover {
    transform: translateX(-8px) rotate(-1deg);
    background: #000000;
    color: #ffffff;
}

.blog-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.blog-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Torn paper sheet with jagged ripped edges */
.torn-paper-sheet {
    position: fixed;
    top: 20px;
    right: 0;
    width: min(520px, 94vw);
    max-height: calc(100vh - 40px);
    background: #ffffff;
    z-index: 10003;
    border: 2.4px solid #000000;
    border-right: none;
    border-radius: 4px 0 0 6px;
    box-shadow: -8px 8px 0px rgba(0, 0, 0, 0.95);
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.torn-paper-sheet::before {
    content: "";
    position: absolute;
    top: -5px; left: -3px; bottom: -5px; width: 4px;
    border-left: 1.5px solid #000000;
    pointer-events: none;
    animation: pen-twitch-2 0.45s steps(3, end) infinite;
}

.torn-paper-sheet.open {
    transform: translateX(0);
}

/* Tape strip holding top of the torn page */
.tape-strip {
    width: 90px;
    height: 24px;
    background: rgba(220, 220, 220, 0.85);
    border: 1px dashed rgba(0, 0, 0, 0.5);
    box-shadow: 1px 2px 2px rgba(0,0,0,0.15);
    transform: rotate(-3deg);
    position: absolute;
    top: 6px;
    left: 20px;
    z-index: 10;
}

.sheet-header {
    padding: 24px 20px 14px 24px;
    border-bottom: 2px dashed #000000;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #ffffff;
    margin-top: 6px;
}

.sheet-title {
    font-family: 'Caveat', cursive;
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.sheet-push-btn {
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 2px 2px 0px #000000;
    border-radius: 4px;
    padding: 3px 12px;
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.sheet-push-btn:hover {
    background: #000000;
    color: #ffffff;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #000000;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scrap-entry {
    border-bottom: 1px dashed #cccccc;
    padding-bottom: 16px;
}

.scrap-entry:last-child {
    border-bottom: none;
}

.scrap-time {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.15rem;
    color: #666666;
    margin-bottom: 2px;
}

.scrap-heading {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.scrap-body {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.35rem;
    color: #111111;
    line-height: 1.45;
    margin: 0;
    text-align: left;
}

/* ── SECTION SWITCHER TABS INSIDE TORN SHEET ─────────────────── */
.sheet-tabs-nav {
    display: flex;
    gap: 12px;
    padding: 10px 24px 6px 24px;
    border-bottom: 2px dashed #000000;
    flex-wrap: wrap;
    background: #ffffff;
}

.sheet-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 2px 6px;
    font-family: 'Caveat', cursive;
    font-size: 1.65rem;
    font-weight: 700;
    color: #666666;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.sheet-tab-btn:hover {
    color: #000000;
    transform: scale(1.05);
}

.sheet-tab-btn.active {
    background: transparent;
    color: #000000;
    border-bottom: 2px solid #000000;
    text-decoration: underline wavy;
}

.sheet-section {
    display: none;
    flex-direction: column;
    gap: 18px;
}

.sheet-section.active {
    display: flex;
}

/* Time & Stats Dividers (Flattened Hierarchy) */
.time-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

.time-stat-box {
    border: none;
    border-bottom: 1px dashed #000000;
    padding: 6px 0 10px 0;
    background: transparent;
    box-shadow: none;
}

.time-stat-label {
    font-family: 'Caveat', cursive;
    font-size: 1.45rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2px;
}

.time-stat-val {
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
}