/**
 * Base CSS for John M. Cahill Portfolio
 * Version: 0.0.1
 * Last Updated: 2025-06-17
 * 
 * This file consolidates all styles from:
 * - modern-minimal.css
 * - polish.css
 * - optimizations/usability-enhancements.css
 */

/* ===========================
   1. MODERN MINIMALIST DESIGN SYSTEM
   =========================== */

/* Modern Minimalist Design System */
:root {
    /* Sophisticated color palette - all light */
    --ink: #0a0a0a;
    --paper: #ffffff;
    --smoke: #fafafa;
    --mist: #f3f4f6;
    
    /* Modern gradient colors - sophisticated earth tones */
    --gradient-start: #2d3436;  /* Charcoal */
    --gradient-mid: #636e72;    /* Steel gray */
    --gradient-end: #b8956a;    /* Warm bronze */
    
    /* Accent colors */
    --accent-dark: #1e272e;     /* Deep charcoal */
    --accent-bronze: #a0845c;   /* Muted bronze */
    --accent-warm: #dfe6e9;     /* Cool gray */
    
    /* Neutral gradients - all light */
    --neutral-gradient: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    --soft-gradient: linear-gradient(135deg, #fefefe 0%, #f9fafb 100%);
    
    /* Spacing system */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography refinements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Modern Navigation */
.modern-nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nav-link {
    position: relative;
    font-weight: 300;
    letter-spacing: 0.01em;
    transition: opacity 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section - Ultra Minimal */
.hero-minimal {
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-minimal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(45, 52, 54, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(184, 149, 106, 0.05) 0%, transparent 50%);
    animation: drift 30s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 100;
    margin-bottom: var(--space-sm);
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 300;
    color: #666;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Quote Block */
.quote-modern {
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: linear-gradient(135deg, #fefefe 0%, #fafafa 100%);
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.quote-modern::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 120px;
    font-weight: 100;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.1;
}

.quote-text {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.8;
    font-style: italic;
    color: #444;
    margin-bottom: var(--space-md);
}

.quote-author {
    font-size: 0.875rem;
    color: #666;
    font-weight: 400;
}

/* Section Design */
.section-minimal {
    padding: var(--space-lg) 0;
    position: relative;
}

.section-title-modern {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    text-align: center;
    margin-bottom: var(--space-lg);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title-modern.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Book Cards - Ultra Modern */
.book-grid {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.book-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(40px);
}

.book-card-modern.in-view {
    opacity: 1;
    transform: translateY(0);
}

.book-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.book-card-inner {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
}

@media (max-width: 768px) {
    .book-card-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.book-cover-modern {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-cover-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-modern:hover .book-cover-modern {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.book-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-title-modern {
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: var(--space-xs);
}

.book-subtitle-modern {
    font-size: 1.125rem;
    color: #666;
    font-weight: 300;
    margin-bottom: var(--space-md);
}

.book-description {
    color: #444;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.book-meta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.meta-item {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-badge {
    background: linear-gradient(135deg, #fefefe 0%, #fafafa 100%);
    border: 1px solid rgba(184, 149, 106, 0.12);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.book-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    color: var(--gradient-start);
    text-decoration: none;
    transition: all 0.3s ease;
}

.book-link-modern:hover {
    gap: 1rem;
    color: var(--gradient-end);
}

/* About Section - Minimal */
.about-modern {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: var(--space-sm);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-text.in-view {
    opacity: 1;
    transform: translateY(0);
}

.about-highlight {
    background: linear-gradient(135deg, #fefefe 0%, #fcfcfc 100%);
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: 16px;
    padding: var(--space-md);
    margin: var(--space-md) 0;
    position: relative;
    overflow: hidden;
}

.about-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

/* Current Work - Floating Card */
.current-work-modern {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 24px;
    padding: var(--space-md);
    box-shadow: 0 4px 30px rgba(167, 139, 250, 0.08);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-work-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(45, 52, 54, 0.08);
}

.work-title {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
    font-weight: 400;
}

/* Social Links - Modern Pills */
.social-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.social-pill {
    padding: 0.75rem 2rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    font-weight: 300;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(45, 52, 54, 0.15);
    background: #fafafa;
    color: var(--gradient-start);
}

/* Subtle brand colors on hover */
.social-facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

.social-twitter:hover {
    border-color: #1da1f2;
    color: #1da1f2;
}

.social-instagram:hover {
    border-color: #e4405f;
    color: #e4405f;
}

.social-goodreads:hover {
    border-color: #553b08;
    color: #553b08;
}

.social-amazon:hover {
    border-color: #ff9900;
    color: #ff9900;
}

/* Footer - Minimal */
.footer-modern {
    text-align: center;
    padding: var(--space-md) 0;
    color: #666;
    font-weight: 300;
    font-size: 0.875rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    opacity: 0.3;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gradient-start) 0%, transparent 100%);
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title-modern {
        font-size: 2rem;
    }
    
    .book-card-inner {
        padding: var(--space-md);
    }
}

/* Light mode only - no dark backgrounds */
body {
    background-color: #ffffff;
    color: #0a0a0a;
}


/* ===========================
   2. POLISH STYLES
   =========================== */

/* Navigation Refinements */
.modern-nav {
    padding: 1.25rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--ink);
    transition: opacity 0.3s ease;
}

.nav-brand:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    list-style: none;
}

/* Polish for Book Cards */
.book-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f7f7f7 0%, #eeeeee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Better Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(167, 139, 250, 0.4);
    outline-offset: 2px;
}

/* Smooth Loading States */
.lazy-image {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Better Typography Scale */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 5rem;
    }
    
    .section-title-modern {
        font-size: 3.5rem;
    }
}

/* Polish for Current Work Card */
.current-work-modern {
    position: relative;
}

.current-work-modern::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(249, 168, 212, 0.1) 100%);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.current-work-modern:hover::after {
    opacity: 1;
}

/* Mobile Menu Toggle (Hidden by default) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
}


/* ===========================
   3. USABILITY ENHANCEMENTS
   =========================== */

/* Better Touch Targets */
a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Improved Form Elements */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="search"]:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e0;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

/* Better Button Styles */
.btn {
    /* Reset */
    appearance: none;
    background: none;
    border: none;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    
    /* Base Styles */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
}

.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: transparent;
    color: #000;
    border: 1px solid #000;
}

.btn-secondary:hover {
    background-color: #000;
    color: #fff;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Button Icons */
.btn-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
    transform: translateX(2px);
}

/* Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Improved Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top-color: var(--gradient-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gradient-start);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Better Error States */
.error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-error {
    border-color: #e53e3e !important;
}

/* Improved Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible Only for Keyboard Navigation */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--gradient-start);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .modern-nav,
    .footer-modern,
    .social-grid,
    .scroll-indicator {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero-minimal {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .book-card-modern {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
/* Form Messages */
.form-message {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form-message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-bounce {
    animation: slideDown 0.3s ease-out, bounce 0.5s ease-in-out 0.3s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
