/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #525252;
    --text-color: #171717;
    --background-color: #ffffff;
    --border-color: #e5e5e5;
    --accent-color: #000000;
    --spacing-unit: 1rem;
    --max-width: 720px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 1.25rem;
    }
    
    body {
        font-size: 17px;
    }
}

/* Header */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 100;
}

header nav {
    padding: 1.25rem 0;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--primary-color);
    margin: 0;
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

.search-bar-container {
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 0;
    background-color: #fafafa;
}

.search-bar-container .container {
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .search-bar-container .container {
        padding: 0 1.25rem;
    }
}

#site-search {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: inherit;
    background-color: #ffffff;
    color: var(--text-color);
    transition: all 0.15s ease;
}

#site-search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

#site-search::placeholder {
    color: #737373;
}

/* Content Wrapper */
.content-wrapper {
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 2rem 0;
    }
}

.content-layout {
    display: block;
}

.content {
    width: 100%;
}

article {
    max-width: 100%;
}

/* Hero Section */
.hero {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.author-intro {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.profile-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: #525252;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.author-text {
    flex: 1;
}

.hero h2 {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.author-signature {
    font-size: 1rem;
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.personal-disclaimer {
    font-size: 0.9375rem;
    color: var(--secondary-color);
    background-color: #f9f9f9;
    padding: 1rem;
    border-left: 3px solid var(--accent-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.personal-disclaimer strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Personal Intro */
.personal-intro {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.personal-intro h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.personal-intro p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.75;
}

.personal-intro p:last-child {
    margin-bottom: 0;
}

/* Article Content */
article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    color: var(--primary-color);
    line-height: 1.3;
}

article h3:first-child {
    margin-top: 0;
}

article p {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

article p:first-of-type {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--secondary-color);
}

article p a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid #d4d4d4;
    transition: border-color 0.15s ease;
    font-weight: 500;
}

article p a:hover {
    border-bottom-color: var(--accent-color);
}

/* AdSense Containers */
.ad-container {
    margin: 0;
    text-align: center;
    width: 100%;
    min-height: 0;
}

.ad-sidebar {
    display: none;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    font-size: 0.875rem;
    color: #737373;
}

/* Responsive */
@media (max-width: 768px) {
    .search-bar-container {
        padding: 0.75rem 0;
    }
    
    .content-wrapper {
        padding: 1.5rem 0;
    }
    
    .hero {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .author-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-image {
        width: 70px;
        height: 70px;
    }
    
    .author-text {
        width: 100%;
    }
    
    .hero h2 {
        font-size: 1.875rem;
        line-height: 1.25;
    }
    
    .lead {
        font-size: 1.0625rem;
    }
    
    .personal-intro {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .personal-intro h3 {
        font-size: 1.375rem;
    }
    
    article h3 {
        font-size: 1.375rem;
        margin-top: 2rem;
        line-height: 1.3;
    }
    
    article p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    article p:first-of-type {
        font-size: 1.0625rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0;
    }
    
    header nav {
        padding: 1rem 0;
    }
    
    header h1 {
        font-size: 1.125rem;
    }
    
    .search-bar-container {
        padding: 0.625rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .search-bar-container .container {
        padding: 0 1rem;
    }
    
    .content-wrapper {
        padding: 1.25rem 0;
    }
    
    .hero h2 {
        font-size: 1.625rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    article h3 {
        font-size: 1.25rem;
        margin-top: 1.75rem;
    }
    
    article p {
        font-size: 0.9375rem;
    }
    
    .personal-intro h3 {
        font-size: 1.25rem;
    }
}
