/* ============================================
   SHARED STYLES - Joe Scanlon Personal Site
   Typewriter/Vintage Paper Theme
   ============================================ */

/* Fonts are loaded via <link> tags in HTML for better performance */

/* ============================================
   CSS VARIABLES - Design System
   ============================================ */
:root {
    --paper: #f2f0e9;
    --paper-alt: #f4f1ea;
    --ink: #2b2b2b;
    --ink-secondary: #4a4a4a;
    --ribbon-red: #d13a3a;
    --highlight: #e8e6df;
    --background-dark: #333;
    --background-pattern: #444;
}

/* ============================================
   BODY & BACKGROUND
   ============================================ */
body {
    background-color: var(--background-dark);
    font-family: 'Courier Prime', monospace;
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    /* Subtle dotted background pattern */
    background-image: radial-gradient(var(--background-pattern) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ============================================
   PAPER CONTAINER - Base Styles
   ============================================ */
.paper-container,
.paper-sheet {
    background-color: var(--paper);
    width: 100%;
    max-width: 800px;
    min-height: 80vh;
    position: relative;

    /* Stacked paper shadow effect */
    box-shadow:
        0 1px 1px rgba(0,0,0,0.15),
        0 10px 0 -5px #eee,
        0 10px 1px -4px rgba(0,0,0,0.15),
        5px 5px 15px rgba(0,0,0,0.5);

    padding: 40px;
    display: flex;
    flex-direction: column;

    /* Paper texture - subtle grid */
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 20px 20px;

    /* Subtle angled paper effect */
    transform: rotate(-1deg);
}

/* CV-specific adjustments */
.paper-sheet {
    max-width: 900px;
    padding: 3rem 4rem;
    background-color: var(--paper-alt);

    /* Additional subtle aging spots */
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.02) 1px, transparent 1px),
        radial-gradient(circle at 10% 20%, rgba(0,0,0,0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0,0,0,0.03) 0%, transparent 20%);
    background-size: 20px 20px, 20px 20px, 100% 100%, 100% 100%;
}

/* Paper noise/crumple texture overlay */
.paper-container::before,
.paper-sheet::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.paper-sheet::before {
    background: 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)' opacity='0.05'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

/* Content layer - sits above paper texture */
.content-layer {
    position: relative;
    z-index: 10;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Headings use typewriter font */
h1, h2, h3 {
    font-family: 'Special Elite', cursive;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0.5px 0.5px 0px rgba(0,0,0,0.15);
    position: relative;
    z-index: 10;
}

h1 {
    color: var(--ink);
    border-bottom: 3px double var(--ink);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ink);
    display: inline-block;
}

/* Ensure content sits above textures */
p, li, span, div {
    position: relative;
    z-index: 10;
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: var(--ink);
    transition: color 0.15s ease;
}

a:hover {
    color: var(--ribbon-red);
}

/* ============================================
   TYPEWRITER LIST STYLE
   ============================================ */
ul.typewriter-list {
    list-style: none;
    padding-left: 1.5rem;
}

ul.typewriter-list li {
    position: relative;
}

ul.typewriter-list li::before {
    content: ">>";
    position: absolute;
    left: -1.5rem;
    color: var(--ink-secondary);
    font-family: 'Special Elite', cursive;
    font-size: 0.8em;
    top: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: none;
        padding: 0;
        display: block;
    }

    .paper-container,
    .paper-sheet {
        box-shadow: none;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 0;
        background-image: none;
    }

    .paper-container::before,
    .paper-sheet::before {
        display: none;
    }

    .no-print {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .paper-container,
    .paper-sheet {
        padding: 20px;
        min-height: 100vh;
    }

    .paper-sheet {
        padding: 2rem 1.5rem;
    }
}
