/* Custom styles for portfolio website - Digital Scrapbook Theme */
/* Dark blue color scheme with typewriter aesthetic */

/* Google Fonts - Karla for readability */
@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;500;600;700&display=swap');

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Ensure footer sits at the bottom with no gap */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

/* Typography - Karla font for readability */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Karla', sans-serif;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.heading-serif {
    font-family: 'Karla', sans-serif;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.body-text {
    font-family: 'Karla', sans-serif;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Scrapbook page background */
body {
    background-color: #f5f1e8;
    background-image: 
        /* Lined paper pattern */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(26, 39, 68, 0.04) 24px,
            rgba(26, 39, 68, 0.04) 25px
        ),
        /* Subtle grid */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(45, 74, 110, 0.03) 40px,
            rgba(45, 74, 110, 0.03) 41px
        );
    position: relative;
}

/* Dark blue color palette - scrapbook theme */
:root {
    --blue-dark-navy: #1a2744;
    --blue-navy: #243a5e;
    --blue-slate: #2d4a6e;
    --blue-slate-med: #3a5f8a;
    --blue-steel: #4a6fa5;
    --blue-steel-light: #5b7fa8;
    --blue-accent: #6b8db0;
    --blue-light: #8aa8c4;
    --cream-bg: #f5f1e8;
    --paper-bg: #fefefe;
    --text-dark: #1a2744;
    --text-medium: #2d4a6e;
    --text-light: #4a6fa5;
}

/* Custom scrollbar styling - dark blue theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #d4d8e0;
}

::-webkit-scrollbar-thumb {
    background: #4a6fa5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a5f8a;
}

/* PDF viewer styling */
.pdf-viewer {
    min-height: 600px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Prevent text selection on PDF viewing pages */
body.work-page {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Card styling with scrapbook feel */
.card-paper {
    background: var(--paper-bg);
    box-shadow: 0 2px 8px 0 rgba(26, 39, 68, 0.15), 0 1px 3px 0 rgba(26, 39, 68, 0.1);
    border: 1px solid rgba(45, 74, 110, 0.2);
    position: relative;
}

.card-paper:hover {
    box-shadow: 0 10px 20px -3px rgba(26, 39, 68, 0.2), 0 4px 8px -2px rgba(26, 39, 68, 0.15);
    transition: all 0.3s ease;
}

/* Document-style cards for Excerpts - Paper document style */
.notebook-card {
    background: #fafafa;
    border-radius: 0;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    aspect-ratio: 3 / 4; /* Portrait orientation */
    min-width: 200px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-image: 
        /* Paper texture */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.02) 1px,
            rgba(0, 0, 0, 0.02) 2px
        );
}

/* Document header line */
.notebook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1;
    pointer-events: none;
}

/* Document corner fold effect */
.notebook-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(
        -135deg,
        transparent 50%,
        rgba(0, 0, 0, 0.05) 50%
    );
    z-index: 2;
    pointer-events: none;
}

/* Background with scrapbook page pattern */
.section-spacing {
    background: var(--cream-bg) !important;
    background-image: 
        /* Lined paper pattern */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(26, 39, 68, 0.04) 24px,
            rgba(26, 39, 68, 0.04) 25px
        ),
        /* Subtle grid */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(45, 74, 110, 0.03) 40px,
            rgba(45, 74, 110, 0.03) 41px
        ) !important;
    position: relative;
}

.notebook-card:hover {
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px) rotate(0deg) !important;
    z-index: 100;
}

.notebook-card-content {
    position: relative;
    z-index: 2;
    background: inherit;
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    padding-top: 3rem; /* Space for document header */
    padding-bottom: 1.75rem;
}

.notebook-card-content .notebook-link {
    margin-top: auto; /* Push link to bottom */
}

/* Dark blue color variants for document cards - document header style */
.notebook-card.scrapbook-blue-1 {
    border-top: 4px solid var(--blue-dark-navy); /* Dark navy header */
}

.notebook-card.scrapbook-blue-1 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-2 {
    border-top: 4px solid var(--blue-navy); /* Navy header */
}

.notebook-card.scrapbook-blue-2 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-3 {
    border-top: 4px solid var(--blue-slate); /* Slate blue header */
}

.notebook-card.scrapbook-blue-3 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-4 {
    border-top: 4px solid var(--blue-slate-med); /* Slate medium header */
}

.notebook-card.scrapbook-blue-4 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-5 {
    border-top: 4px solid var(--blue-steel); /* Steel blue header */
}

.notebook-card.scrapbook-blue-5 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-6 {
    border-top: 4px solid var(--blue-steel-light); /* Steel light header */
}

.notebook-card.scrapbook-blue-6 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-7 {
    border-top: 4px solid var(--blue-accent); /* Accent blue header */
}

.notebook-card.scrapbook-blue-7 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-8 {
    border-top: 4px solid var(--blue-light); /* Light blue header */
}

.notebook-card.scrapbook-blue-8 .notebook-card-content {
    color: var(--text-dark);
}

.notebook-card.scrapbook-blue-9 {
    border-top: 4px solid var(--blue-dark-navy); /* Dark navy header */
}

.notebook-card.scrapbook-blue-9 .notebook-card-content {
    color: var(--text-dark);
}

/* Subtle rotations for document placement - more subtle than photos */
.notebook-card:nth-child(1) { transform: rotate(-0.8deg); }
.notebook-card:nth-child(2) { transform: rotate(1deg); }
.notebook-card:nth-child(3) { transform: rotate(-1.2deg); }
.notebook-card:nth-child(4) { transform: rotate(0.6deg); }
.notebook-card:nth-child(5) { transform: rotate(-0.5deg); }
.notebook-card:nth-child(6) { transform: rotate(1.2deg); }
.notebook-card:nth-child(7) { transform: rotate(-0.9deg); }
.notebook-card:nth-child(8) { transform: rotate(0.7deg); }
.notebook-card:nth-child(9) { transform: rotate(-0.6deg); }

/* Typography styles for documents - professional with subtle handwriting */
.notebook-card .notebook-title {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Karla', sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--text-medium);
    border-bottom: 1px solid rgba(26, 39, 68, 0.15);
    padding-bottom: 0.25rem;
}

.notebook-card .notebook-subtitle {
    font-size: 0.6875rem;
    font-weight: 400;
    font-family: 'Karla', sans-serif;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.notebook-card .notebook-main-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Karla', sans-serif;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--text-dark);
    letter-spacing: 0.02em;
}

.notebook-card .notebook-description {
    font-size: 0.8125rem;
    font-family: 'Karla', sans-serif;
    line-height: 1.6;
    color: var(--text-medium);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.notebook-card .notebook-link {
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Karla', sans-serif;
    color: var(--blue-slate-med);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.notebook-card .notebook-link:hover {
    color: var(--blue-slate);
}

/* Decorative elements */
.quote-mark {
    font-family: Georgia, serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--blue-medium);
    opacity: 0.2;
}

.divider-line {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--blue-medium), transparent);
    margin: 2rem 0;
}

/* Animation for cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Mobile menu transitions */
.mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Section spacing */
.section-spacing {
    padding: 4rem 0;
}

/* Literary quote styling */
.literary-quote {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-medium);
    padding: 1.5rem;
    border-left: 4px solid var(--blue-medium);
    background: var(--blue-soft);
    margin: 2rem 0;
}

/* Link styling with blue accent */
a {
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue-medium);
}

/* Button styling */
.btn-primary {
    background-color: var(--blue-medium);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary:hover {
    background-color: var(--blue-deep);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    border: 2px solid var(--blue-medium);
    color: var(--blue-medium);
    background: transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background-color: var(--blue-slate-med);
    color: white;
}

/* ============================================
   SCRAPBOOK STYLING UPDATES
   ============================================ */

/* Update header colors */
header.bg-blue-900 {
    background-color: var(--blue-dark-navy) !important;
}

/* Update link hover colors */
a:hover {
    color: var(--blue-steel) !important;
}

/* Update button colors */
.btn-primary {
    background-color: var(--blue-slate-med);
    color: white;
}

.btn-primary:hover {
    background-color: var(--blue-slate);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -1px rgba(26, 39, 68, 0.3);
}

.btn-outline {
    border: 2px solid var(--blue-slate-med);
    color: var(--blue-slate-med);
    background: transparent;
}

/* Update heading colors */
h1, h2, h3, h4, h5, h6,
.text-blue-900 {
    color: var(--blue-dark-navy) !important;
}

/* Update text colors */
.text-blue-700 {
    color: var(--blue-slate-med) !important;
}

.text-blue-600 {
    color: var(--blue-steel) !important;
}

.text-blue-800 {
    color: var(--blue-slate) !important;
}

.text-blue-300 {
    color: var(--blue-accent) !important;
}

/* Update border colors */
.border-blue-300 {
    border-color: var(--blue-accent) !important;
}

.border-blue-500 {
    border-color: var(--blue-steel) !important;
}

/* ============================================
   Tablet-style PDF viewer frame
   ============================================ */
.tablet-frame {
    max-width: 900px;
    margin: 0 auto;
    background: #111;
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center; /* center inner screen reliably */
}

.tablet-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 6px;
    background: #222;
    border-radius: 3px; /* camera/earpiece */
}

.tablet-frame::after {
    content: '';
    position: absolute;
    top: 10px;
    left: calc(50% + 50px);
    width: 8px;
    height: 8px;
    background: #222;
    border-radius: 9999px; /* camera dot */
}

.tablet-screen {
    background: #000;
    border-radius: 18px;
    overflow: hidden; /* prevent any internal overflow bars */
    aspect-ratio: 3 / 4; /* portrait tablet */
    width: min(820px, 100%);
    height: auto;
}

.tablet-screen .pdf-viewer {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 18px;
    min-height: 0; /* override base min-height */
}

/* (Removed bezel masks that hid scrollbars) */

@media (min-width: 1024px) {
    .tablet-frame {
        max-width: 820px;
    }
}

/* Fallback for browsers/environments without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
    .tablet-screen {
        width: min(820px, 100%);
        height: 1093px; /* 820 * 4/3 */
    }
}