@font-face {
    font-family: 'Permanent Marker';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/permanentmarker.woff2') format('woff2');
}

@font-face {
    font-family: 'Schoolbell';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/schoolbell.woff2') format('woff2');
}

/* Root variables for our "marker" colors */
:root {
    --marker-red: #e74c3c;
    --marker-blue: #3498db;
    --marker-green: #2ecc71;
    --marker-yellow: #f1c40f;
    --marker-black: #2c3e50;
    --marker-brown: #8e44ad;
    /* Changed to purple-ish brown for whimsy */
    --marker-cyan: #1abc9c;
    --marker-grey: #7f8c8d;
    --paper-bg: #fdfcf0;
    --ink-color: #1a1a1a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--paper-bg);
    color: var(--ink-color);
    font-family: 'Schoolbell', cursive;
    /* Child-like handwriting font */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Very subtle background scribbles/texture could go here */
.paper-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
}

/* =========================================
   Typography
   ========================================= */
h1,
.board-title,
.card-title {
    font-family: 'Permanent Marker', cursive;
    /* Thicker, bolder marker look for headings */
    text-transform: uppercase;
    text-align: center;
}

h1 {
    color: var(--marker-red);
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--marker-red);
    font-family: 'Schoolbell', cursive;
}

.board-title {
    font-size: 2rem;
    background: white;
    padding: 0.5rem 2rem;
    display: inline-block;
    border: 3px solid var(--marker-black);
    /* Wonky border radius */
    border-radius: 25px 5px 30px 10px / 10px 30px 5px 20px;
    margin-top: -1.5rem;
    /* Pull it up to sit on the border */
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%) rotate(1deg);
    z-index: 10;
}

/* =========================================
   Layout Containers
   ========================================= */
.project-board {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin-top: 7rem;
    /* Pushed down to accommodate larger header text */
    padding: 4rem 2rem 2rem 2rem;
    border: 4px solid var(--marker-black);
    border-radius: 10px 30px 5px 25px / 25px 5px 30px 10px;
    background-color: #fff;
    /* Solid white to contrast with slightly off-white body */
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.05);
    /* Crude drop shadow */
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* =========================================
   Top Left Banner
   ========================================= */
.wonky-banner {
    position: absolute;
    top: 2rem;
    left: 2rem;
    padding: 1rem 2rem;
    background: white;
    border: 5px solid var(--marker-blue);
    /* Extreme wonky border for the scroll effect */
    border-radius: 5px 255px 15px 225px / 255px 15px 225px 15px;
    transform: rotate(-3deg);
    box-shadow: 5px 5px 0px var(--marker-green);
    /* Second marker color as shadow */
    z-index: 20;
    transition: opacity 0.3s ease;
    /* Smooth transition for transparency */
}

/* Make banner transparent if the user is hovering over a project link */
body:has(.link-card:hover) .wonky-banner {
    opacity: 0.15;
    pointer-events: none;
    /* Let clicks pass through if somehow it overlaps */
}

.wonky-banner::before {
    /* Little fake roll up effect on the left */
    content: '';
    position: absolute;
    left: -15px;
    top: 10%;
    bottom: 10%;
    width: 20px;
    background: white;
    border: 4px solid var(--marker-green);
    border-radius: 50%;
    z-index: -1;
}

/* =========================================
   Link Cards (The Projects)
   ========================================= */
.link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 150px;
    text-decoration: none;
    color: var(--ink-color);
    background: white;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    /* Default wonky shape */
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    border-width: 4px;
    border-style: solid;
}

.link-card:hover {
    transform: scale(1.05) rotate(0deg) !important;
    /* Stand straight up on hover */
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.1);
}

/* Add this class to any card to completely hide it from the board */
.hidden-card {
    display: none !important;
}

.ready-link-flag {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--marker-yellow);
    color: var(--marker-black);
    padding: 2px 10px;
    border: 3px solid var(--marker-black);
    border-radius: 25px 5px 30px 10px / 10px 30px 5px 20px;
    font-size: 0.9rem;
    font-family: 'Permanent Marker', cursive;
    transform: rotate(15deg);
    z-index: 10;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
}

/* THE MAGIC: If the href is NOT "#", the link is "ready" so we show the flag! */
a.link-card:not([href="#"]) .ready-link-flag {
    display: block;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.icon {
    font-size: 1.5rem;
}

/* Different Marker Color Borders */
.border-red {
    border-color: var(--marker-red);
}

.border-blue {
    border-color: var(--marker-blue);
    border-style: dashed;
}

.border-green {
    border-color: var(--marker-green);
    border-width: 5px;
}

.border-yellow {
    border-color: var(--marker-yellow);
    border-width: 6px;
}

.border-black {
    border-color: var(--marker-black);
}

.border-brown {
    border-color: var(--marker-brown);
    border-style: dotted;
    border-width: 6px;
}

.border-cyan {
    border-color: var(--marker-cyan);
}

.border-grey {
    border-color: var(--marker-grey);
}

/* Initial wonky rotations applied randomly across classes */
.rotate-left {
    transform: rotate(-4deg);
}

.rotate-right {
    transform: rotate(5deg);
}

.rotate-slight-left {
    transform: rotate(-2deg);
}

.rotate-slight-right {
    transform: rotate(3deg);
}

/* Specific shape overrides */
.tag {
    position: relative;
    border-radius: 10px;
    clip-path: polygon(20% 0%, 100% 0, 100% 100%, 0 100%, 0 20%);
}

.tag-hole {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 3px solid var(--marker-black);
    background: var(--paper-bg);
}

.scroll {
    border-radius: 0;
    border-left: 10px solid var(--marker-black);
    border-right: 10px solid var(--marker-black);
    border-top: 2px solid var(--marker-black);
    border-bottom: 2px solid var(--marker-black);
}

/* =========================================
   Footer
   ========================================= */
.wonky-footer {
    margin-top: 4rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 3px solid var(--marker-black);
    padding-bottom: 5px;
    transform: rotate(-1deg);
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .wonky-banner {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 2rem;
        text-align: center;
        width: 90%;
        max-width: 400px;
    }

    .project-board {
        margin-top: 1rem;
    }
}