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

body {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', sans-serif;
    line-height: 1.65;
    color: #1a1a1a;
    background-color: #ffffff;
    font-size: 17px;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.75rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

h2 {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.875rem;
    font-weight: 590;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1.5rem;
    max-width: 72ch;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
}

/* Layout */
body {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    margin-bottom: 3rem;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 2rem;
}

.tagline {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1.5rem;
    max-width: none;
}

nav {
    margin-top: 1rem;
}

nav a {
    color: #666;
    text-decoration: none;
    margin-right: 2rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #1a1a1a;
}

/* Search */
.search-container {
    margin-top: 1.5rem;
}

#search {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

#search:focus {
    outline: none;
    border-color: #666;
}

/* Reviews */
#reviews {
    margin-bottom: 4rem;
}

.review {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #f0f0f0;
}

.review:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-meta {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.review-meta .published::after {
    content: " | ";
    margin: 0 0.5rem;
}

h2 .year {
    color: #666;
    font-weight: 400;
}

.short-date {
    display: none;
}

.full-date {
    display: inline;
}

.review-content {
    font-size: 1.125rem;
    line-height: 1.7;
    text-align: justify;
    text-justify: inter-word;
    text-wrap: pretty;
    orphans: 4;
    widows: 4;
    hanging-punctuation: first last;
    word-spacing: -0.05em;
    letter-spacing: 0.01em;
}

.review-content p {
    margin-bottom: 1.75rem;
    text-indent: 0;
}

.review-content p:first-child {
    text-indent: 0;
}

/* About section */
#about {
    margin-bottom: 4rem;
}

#about p {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* Loading and End Messages */
.loading-indicator, .end-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.loading-indicator p, .end-message p {
    max-width: none;
    margin: 0;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 1.5rem 1.75rem;
        font-size: 16px;
    }
    
    h1 {
        font-size: 2.25rem;
        letter-spacing: -0.025em;
    }
    
    h2 {
        font-size: 1.625rem;
        letter-spacing: -0.015em;
    }
    
    .review-content {
        font-size: 1.05rem;
        text-align: justify;
        text-justify: inter-character;
        line-height: 1.7;
        text-wrap: pretty;
        word-spacing: -0.02em;
        letter-spacing: 0.005em;
        hanging-punctuation: none;
        orphans: 2;
        widows: 2;
    }
    
    p {
        max-width: none;
    }
    
    .review-meta .published {
        font-size: 0.85rem;
    }
    
    .review-meta .author {
        font-size: 0.85rem;
    }
    
    .short-date {
        display: inline;
    }
    
    .full-date {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
        padding: 1.5rem 2rem;
    }
    
    h1 {
        font-size: 1.875rem;
        line-height: 1.15;
        margin-bottom: 0.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.25;
    }
    
    .review {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }
    
    .review-content {
        font-size: 1rem;
        line-height: 1.65;
        text-align: justify;
        text-justify: inter-character;
        text-wrap: pretty;
        word-spacing: -0.015em;
        letter-spacing: 0.003em;
        hanging-punctuation: none;
        orphans: 2;
        widows: 2;
    }
    
    .review-content p {
        margin-bottom: 1.5rem;
    }
}