/* ═══════════════════════════════════════════════════════════
   NOTES.CSS
   Everything note and paper-related
   - Notes desk layout (3-column with sticky notes)
   - Sticky notes with pins
   - Notebook pages with lined paper
   - Polaroid-style notes
   - Bookmarks and index cards
   - Handwritten style elements
   
   Design philosophy:
   Create the feeling of a desk covered in study materials,
   sticky notes, and handwritten annotations
   ═══════════════════════════════════════════════════════════ */

/* Notes desk layout */
.notes-desk {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 2rem;
    width: 100%;
    max-width: var(--container-max);
    margin: var(--space-xl) auto;
    padding: 0 var(--space-md);
    align-items: start;
}

/* Notes paper (center) */
.notes-paper {
    max-width: 900px;
    margin: 0 auto;
}

/* Notes columns */
.notes-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
}

.notes-column--left {
    align-items: flex-end;
}

.notes-column--right {
    align-items: flex-start;
}

/* Note base style */
.note {
    position: relative;
    padding: 1.5rem 1.75rem;
    max-width: 280px;
    font-family: var(--font-body);
    line-height: 1.7;
    border-radius: 4px 12px 12px 4px;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.08),
        0 2px 4px rgba(0,0,0,0.04);
    transform: rotate(-0.5deg);
    transition: all 0.3s ease;
}

.note:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Note pin */
.note__pin {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.note__pin::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 4px;
    width: 4px;
    height: 12px;
    background: rgba(0,0,0,0.05);
    transform: rotate(15deg);
}

/* Lined note variant */
.note--lined {
    background-image: 
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 23px,
            rgba(0,0,0,0.05) 24px
        );
}

/* Note colors */
.note--yellow {
    background: var(--note-yellow);
    border-left: 4px solid #e6c34c;
}

.note--blue {
    background: var(--note-blue);
    border-left: 4px solid #7aa5c2;
}

.note--green {
    background: var(--note-green);
    border-left: 4px solid #8bb591;
}

.note--peach {
    background: var(--note-peach);
    border-left: 4px solid #e5b79b;
}

/* Responsive */
@media (max-width: 1200px) {
    .notes-desk {
        grid-template-columns: 1fr;
    }
    
    .notes-column {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .notes-column--left,
    .notes-column--right {
        align-items: center;
    }
    
    .notes-paper {
        order: -1;
    }
    
    .note {
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .note {
        max-width: 100%;
        width: 100%;
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   ENHANCED NOTEBOOK STYLES
   Lined paper, annotations, sketches
   ═══════════════════════════════════════════════════════════ */

/* Lined notebook page */
.notebook-page--lined {
    background-image: 
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 31px,
            rgba(175, 190, 210, 0.2) 31px,
            rgba(175, 190, 210, 0.2) 32px
        );
    background-position: 0 80px;
}

.notebook-page--lined::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(220, 100, 100, 0.2);
    z-index: 1;
}

/* Notebook headings */
.notebook-heading {
    font-size: 1.75rem;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
}

.notebook-subheading {
    font-size: 1.3rem;
    color: var(--color-text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.notebook-paragraph {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
}

/* Notebook lists */
.notebook-list {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 2;
    color: var(--color-text-secondary);
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.notebook-list li {
    margin-bottom: 0.5rem;
}

/* Notebook sketch */
.notebook-sketch {
    background: rgba(0, 0, 0, 0.02);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px dashed var(--color-border);
    margin: 2rem 0;
    text-align: center;
}

.sketch-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.sketch-caption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--color-text-tertiary);
}

/* Notebook annotation (margin note style) */
.notebook-annotation {
    display: inline-block;
    background: var(--note-yellow);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 1rem 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Responsive notebook */
@media (max-width: 768px) {
    .notebook-page--lined::before {
        left: 30px;
    }
    
    .notebook-heading {
        font-size: 1.4rem;
    }
    
    .notebook-subheading {
        font-size: 1.15rem;
    }
    
    .notebook-list {
        margin-left: 1.5rem;
    }
    
    .sketch-image {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   BEAUTIFUL NEW ENHANCEMENTS
   Additional note and paper effects
   ═══════════════════════════════════════════════════════════ */

/* Washi tape effect (decorative tape on notes) */
.note--taped::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.6) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Folded corner effect */
.note--folded::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 30px 30px;
    border-color: transparent transparent rgba(0, 0, 0, 0.08) transparent;
}

/* Coffee stain effect (subtle) */
.note--stained::before {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(150, 100, 50, 0.08) 0%,
        rgba(150, 100, 50, 0.04) 50%,
        transparent 70%);
    pointer-events: none;
}

/* Wider note variant */
.note--wide {
    max-width: 350px;
    padding: 2rem 2.25rem;
}

/* Extra sticky effect (more shadow) */
.note--prominent {
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.08);
    transform: rotate(-1deg) translateY(-4px);
}

.note--prominent:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.03);
}

/* Cluster of notes - stacked visibly without overlap */
.note-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    justify-content: center;
    align-items: flex-start;
    margin: var(--space-xl) 0;
}

.note-cluster .note {
    position: relative;
    flex: 0 1 auto;
    min-width: 220px;
    max-width: 320px;
}

.note-cluster .note:nth-child(1) {
    transform: rotate(-1.5deg);
}

.note-cluster .note:nth-child(2) {
    transform: rotate(1deg);
}

.note-cluster .note:nth-child(3) {
    transform: rotate(-0.5deg);
}

.note-cluster .note:hover {
    transform: rotate(0deg) scale(1.02) !important;
}

/* Notebook page with margin annotations */
.notebook-page--annotated {
    position: relative;
}

.margin-annotation {
    position: absolute;
    right: -180px;
    top: 100px;
    width: 150px;
    font-family: 'Caveat', cursive;
    font-size: 0.95rem;
    color: var(--color-text-tertiary);
    padding: 0.75rem;
    background: var(--note-yellow);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: rotate(2deg);
}

.margin-annotation::before {
    content: '→';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--color-accent);
}

/* Checkmark list (for completed items) */
.checklist {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
}

.checklist-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.checklist-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--note-green);
    color: #5a8a5a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.checklist-item--pending::before {
    content: '○';
    background: var(--note-blue);
    color: #6B8EA8;
}

/* Underline text (handwritten style) */
.underline-emphasis {
    position: relative;
    display: inline;
}

.underline-emphasis::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    opacity: 0.5;
}

/* Handwritten arrow */
.arrow-annotation {
    display: inline-block;
    font-family: 'Caveat', cursive;
    color: var(--color-accent);
    font-size: 1.5rem;
    margin: 0 0.5rem;
}

/* Post-it note stack (realistic) */
.postit-stack {
    position: relative;
    width: 200px;
    margin: var(--space-lg) auto;
}

.postit-stack .note {
    position: relative;
    margin-bottom: 8px;
}

.postit-stack .note:nth-child(1) {
    transform: rotate(0deg);
}

.postit-stack .note:nth-child(2) {
    transform: rotate(1deg) translateY(-4px);
}

.postit-stack .note:nth-child(3) {
    transform: rotate(-1deg) translateY(-8px);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .margin-annotation {
        position: relative;
        right: auto;
        top: auto;
        width: auto;
        margin: var(--space-md) 0;
    }
    
    .margin-annotation::before {
        content: '↓';
        left: 50%;
        top: -25px;
        transform: translateX(-50%);
    }
    
    .note-cluster .note {
        position: relative;
        top: auto !important;
        left: auto !important;
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 768px) {
    .note--wide {
        max-width: 100%;
    }
    
    .postit-stack {
        width: 100%;
    }
}