/* Modern Minimalist Design - Stories.mrnguyen.com */

/* Atkinson Hyperlegible Font */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;500;600;700&display=swap');

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #3897f0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: #4a4a4a;
}

/* Header - Minimal & Clean */
.top-bar {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #efefef;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar .wrapper {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar .logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1a1a1a;
    text-transform: uppercase;
}

.top-bar .logo a {
    color: #1a1a1a;
}

.top-bar .logo a:hover {
    color: #1a1a1a;
}

/* Main Content */
.main {
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Header */
.blog-header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 20px;
}

.blog-header p {
    font-size: 1rem;
    color: #8e8e8e;
    max-width: 400px;
    margin: 0 auto;
}

/* Polaroid Article Cards */
article.post-photo {
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    /* Polaroid white border effect */
    padding: 24px 24px 48px 24px;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
}

/* Create authentic Polaroid white border look */
article.post-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
    border-radius: 2px;
}

article.post-photo header {
    padding: 20px;
    margin-bottom: 12px;
    /* Title appears at top */
    -webkit-order: 1;
    order: 1;
}

article.post-photo header h1 {
    font-size: 1rem;
    font-weight: 700;
    color: #262626;
    margin: 0;
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.4;
}

.article-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: #737373;
    text-align: center;
    margin-top: 8px;
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, sans-serif;
}

.article-date i {
    margin-right: 4px;
    font-size: 0.7rem;
    vertical-align: middle;
}

.article-date span {
    vertical-align: middle;
}

.article-body {
    padding: 20px;
    -webkit-order: 2;
    order: 2;
}

.article-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: #262626;
    margin-bottom: 1rem;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.article-body img.article-photo {
    margin: 0 15px;
    width: calc(100% - 30px);
    height: auto;
    border-radius: 2px;
    margin-top: 0;
    display: block;
}

/* Content Warning */
.article-body .content-warning {
    background: #fff9e6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 0.875rem;
}

.article-body .content-warning small {
    color: #b7791f;
}

.article-body .content-warning i {
    font-style: italic;
}

/* Past Years Section */
.past-years-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-top: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #efefef;
}

.past-years-section header h1 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #efefef;
}

.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.years-grid a {
    display: block;
    text-align: center;
    padding: 10px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
}

.years-grid a:hover {
    background: #3897f0;
    color: #fff;
}

/* Footer */
.blog-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    color: #999;
    font-size: 0.875rem;
}

.blog-footer p {
    color: #999;
    margin: 0;
}

.blog-footer .new-post-link {
    opacity: 0;
    font-size: 0.75rem;
    color: #ccc;
    transition: opacity 0.3s ease;
    margin-top: 8px;
}

.blog-footer:hover .new-post-link {
    opacity: 1;
}

/* Instagram-style form styling */
.insta-form-container {
    max-width: 500px;
    margin: 0 auto 40px;
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
}

.insta-form-header {
    border-bottom: 1px solid #dbdbdb;
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #262626;
}

.insta-form-body {
    padding: 24px 32px;
}

.insta-form-group {
    margin-bottom: 20px;
}

.insta-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8e8e8e;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.insta-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    background: #fafafa;
    font-size: 14px;
    color: #262626;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.insta-input:focus {
    outline: none;
    border-color: #a8a8a8;
    background: #fff;
}

.insta-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    background: #fafafa;
    font-size: 14px;
    color: #262626;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.insta-textarea:focus {
    outline: none;
    border-color: #a8a8a8;
    background: #fff;
}

.insta-photo-upload {
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
    background: #fff;
}

.insta-photo-upload:hover {
    border-color: #dbdbdb;
    background: #fff;
}

.insta-photo-upload input[type="file"] {
    display: none;
}

.insta-photo-upload .upload-icon {
    font-size: 48px;
    color: #8e8e8e;
    margin-bottom: 12px;
}

.insta-photo-upload .upload-text {
    color: #262626;
    font-size: 14px;
    margin-bottom: 4px;
}

.insta-photo-upload .upload-subtext {
    color: #8e8e8e;
    font-size: 12px;
}

.insta-btn {
    width: 100%;
    padding: 8px 16px;
    background: #0095f6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.insta-btn:hover {
    opacity: 0.9;
}

.insta-secret-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
}

.insta-secret-toggle input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.insta-secret-toggle label {
    font-size: 14px;
    color: #262626;
    cursor: pointer;
}

.insta-form-footer {
    padding: 16px 32px;
    background: #fafafa;
    border-top: 1px solid #dbdbdb;
}

/* Report Form */
.report-form-container {
    max-width: 500px;
    margin: 0 auto 40px;
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
}

.report-form-container .insta-form-header {
    border-bottom: 1px solid #dbdbdb;
}

.report-form-body {
    padding: 24px 32px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

article.post-photo {
    animation: fadeIn 0.4s ease forwards;
}

/* Responsive */
@media (max-width: 640px) {
    .top-bar {
        height: 50px;
    }
    
    .top-bar .logo {
        font-size: 1rem;
    }
    
    .main {
        padding: 8px 4px;
    }
    
    .blog-header {
        padding: 24px 16px;
    }
    
    .blog-header p {
        font-size: 0.875rem;
    }
    
    article.post-photo {
        border-radius: 8px;
        margin-bottom: 16px;
        padding: 8px 8px 24px 8px;
    }
    
    article.post-photo header,
    .article-body {
        padding: 4px;
    }
    
    article.post-photo header h1 {
        font-size: 1.125rem;
    }
    
    .article-body img.article-photo {
        margin: 0 4px;
        width: calc(100% - 8px);
    }
    
    .years-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }
    
    .insta-form-container,
    .report-form-container {
        margin: 0 16px 24px;
    }
    
    .insta-form-body,
    .report-form-body {
        padding: 20px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* Uploaded Image Status */
#uploaded_image {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #166534;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

#uploaded_image .text-success {
    color: #166534;
}

/* Upload Preview */
.uploaded-preview {
    text-align: center;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-success-icon {
    font-size: 2rem;
    color: #22c55e;
    margin-bottom: 12px;
}

.uploaded-preview p {
    color: #166534;
    font-weight: 500;
    margin-bottom: 16px;
}

.uploaded-preview img {
    max-width: 450px;
    max-height: 450px;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.upload-error {
    text-align: center;
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-error-icon {
    font-size: 2rem;
    color: #ef4444;
    margin-bottom: 12px;
}

.upload-error p {
    color: #991b1b;
    font-weight: 500;
    margin: 0;
}

