/* --- Fonts --- */
/* Caveat for handwriting English, Zhi Mang Xing for handwriting Chinese, Space Mono for typing */

:root {
    --bg-paper: #f4f1ea;
    --text-ink: #2c2c2c;
    --text-ink-light: #555555;
    
    /* Sticky Note Colors */
    --note-yellow: #fef08a;
    --note-pink: #fbcfe8;
    --note-blue: #bfdbfe;
    --note-green: #bbf7d0;
    
    /* Fonts */
    --font-typewriter: 'Space Mono', monospace;
    --font-handwriting-en: 'Caveat', cursive;
    --font-handwriting-zh: 'Zhi Mang Xing', cursive;
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-ink);
    font-family: var(--font-typewriter);
    overflow: hidden; /* Prevent scrolling, treat as a fixed desk */
    position: relative;
    height: 100vh;
    width: 100vw;
}

/* --- Paper Texture Background --- */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    /* CSS generated noise/texture for paper feel */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: normal;
}

.handwriting {
    font-family: var(--font-handwriting-zh), var(--font-handwriting-en);
    letter-spacing: 2px;
}

/* --- Header --- */
.page-header {
    position: absolute;
    top: 5%;
    left: 5%;
    transform: rotate(-2deg);
    pointer-events: none; /* Let clicks pass through to desk */
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.logo-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-ink);
}

.page-header h1 {
    font-size: 3rem;
    font-family: var(--font-handwriting-zh), var(--font-handwriting-en);
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-ink-light);
    margin-top: 5px;
    font-style: italic;
}

/* --- Desk Area (Interactive Canvas) --- */
.desk {
    position: relative;
    width: 100%;
    height: 100%;
}

.draggable {
    position: absolute;
    cursor: grab;
    user-select: none;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.draggable:active {
    cursor: grabbing;
    transform: scale(1.02) !important; /* Slightly enlarge while dragging */
    box-shadow: 10px 15px 25px rgba(0,0,0,0.2) !important;
}

/* --- Sticky Notes --- */
.sticky-note {
    width: 250px;
    padding: 20px;
    background-color: var(--note-yellow);
    box-shadow: 2px 4px 10px rgba(0,0,0,0.1);
    /* Hand-drawn irregular border */
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sticky-note p {
    font-size: 0.9rem;
    line-height: 1.4;
}

.note-yellow { background-color: var(--note-yellow); }
.note-pink { background-color: var(--note-pink); }
.note-blue { background-color: var(--note-blue); }
.note-green { background-color: var(--note-green); }

/* --- Pins & Tape --- */
.pin {
    width: 12px;
    height: 12px;
    background-color: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.3), 2px 2px 4px rgba(0,0,0,0.2);
}

.tape {
    width: 80px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.4);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 2px;
    backdrop-filter: blur(2px);
}

/* --- Polaroids --- */
.polaroid {
    background-color: #fff;
    padding: 10px 10px 30px 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 220px;
}

.photo {
    width: 100%;
    height: 180px;
    background-color: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Sketchy image border */
    border-radius: 2px 3px 2px 4px / 4px 2px 3px 2px;
}

.project-photo {
    background-color: #1e1e1e; /* Dark terminal background */
    padding: 0; /* Remove padding for the terminal look */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* --- macOS Terminal Styles --- */
.mac-header {
    background-color: #333;
    height: 20px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 5px;
    width: 100%;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.mac-body {
    padding: 8px;
    font-size: 0.55rem;
    color: #f8f8f2;
    font-family: var(--font-typewriter);
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

.mac-body .user { color: #a6e22e; } /* Green */
.mac-body .path { color: #66d9ef; } /* Blue */
.mac-body .log { color: #f1fa8c; }  /* Yellow */

.mac-body .cursor {
    display: inline-block;
    width: 6px;
    height: 10px;
    background-color: #fff;
    animation: blink 1s step-end infinite;
    vertical-align: baseline;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.caption {
    margin-top: 15px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-ink);
}

/* --- Doodle Elements --- */
.doodle-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.doodle-list i {
    font-size: 1.2rem;
    vertical-align: middle;
}

.doodle-card {
    background: transparent;
    padding: 20px;
    max-width: 250px;
}

.email-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 1.5rem;
    color: #2563eb;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-underline-offset: 4px;
}

.email-link:hover {
    color: #1d4ed8;
}

.scribble {
    margin-top: 10px;
    width: 100%;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0,5 Q10,0 20,5 T40,5 T60,5 T80,5 T100,5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.decoration {
    position: absolute;
    color: var(--text-ink-light);
    pointer-events: none;
}

/* --- Hot Air Balloons Background --- */
.balloons-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to desk */
    overflow: hidden;
    z-index: 1; /* Above paper, below desk items */
    opacity: 0.8;
}

.balloon {
    position: absolute;
    bottom: -150px;
    animation: floatUp linear infinite;
}

.balloon svg {
    width: 80px;
    height: auto;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
}

.balloon-1 {
    left: 15%;
    animation-duration: 45s;
    animation-delay: 0s;
    transform: scale(0.8);
}

.balloon-2 {
    left: 60%;
    animation-duration: 60s;
    animation-delay: 10s;
    transform: scale(1.2);
}

.balloon-3 {
    left: 80%;
    animation-duration: 50s;
    animation-delay: 5s;
    transform: scale(0.6);
}

@keyframes floatUp {
    0% {
        bottom: -150px;
        transform: translateX(0) rotate(-5deg);
    }
    50% {
        transform: translateX(30px) rotate(5deg);
    }
    100% {
        bottom: 110vh;
        transform: translateX(-15px) rotate(-5deg);
    }
}

/* --- Footer / Beian Labels --- */
.footer-labels {
    position: fixed;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 100;
    pointer-events: none; /* Let the container pass clicks, but links should be clickable */
}

.beian-link {
    pointer-events: auto; /* Make the links themselves clickable */
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(250, 245, 235, 0.9); /* Warm paper/tape color */
    padding: 4px 12px;
    font-size: 0.75rem;
    color: #666;
    text-decoration: none;
    font-family: var(--font-typewriter);
    /* Torn tape edge effect */
    clip-path: polygon(2% 0, 98% 0, 100% 10%, 98% 90%, 100% 100%, 2% 100%, 0% 90%, 2% 10%);
    transform: rotate(-1.5deg);
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

.beian-link:nth-child(2) {
    transform: rotate(1deg);
}

.beian-link:hover {
    transform: scale(1.05) rotate(0deg);
    color: #222;
}

.beian-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: grayscale(20%); /* slightly mute the colors to match the vintage feel */
}


