/* ---------- RESET & SMOOTH BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: url('/bg-img.jpg') center center / cover fixed no-repeat;
    color: #e2e8f0;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Lighter overlay – background image more visible */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 26, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* Push footer down */
body > :not(footer) {
    flex: 1;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---------- HERO (full-page, no blank space) ---------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.fullpage {
    min-height: 100vh;
    height: 100vh;
}

.journals-hero, .about-hero {
    min-height: 60vh;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10,15,26,0.3), rgba(15,23,42,0.2));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 900px;
    padding: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.archive-title {
    font-size: clamp(2.5rem, 10vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
    font-family: 'Playfair Display', Georgia, serif;
}

.hero-description {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-quote {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: #f1f5f9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Playfair Display', Georgia, serif;
}

.quote-author {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: #94a3b8;
    font-style: normal;
}

.hero-sub {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* ---------- SQUARE BUTTONS (border-radius: 0) ---------- */
.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 0px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}
.btn-primary:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(59,130,246,0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border-color: white;
    backdrop-filter: blur(4px);
}
.btn-secondary:hover {
    background: white;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255,255,255,0.2);
}

.main-hero, .journals-hero, .about-hero {
    background-image: none;
}

/* ---------- JOURNALS SECTION (square corners) ---------- */
.journals-section {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(2px);
    padding: 3rem 0 4rem;
    width: 100%;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 1.8rem;
}
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.search-box input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    border: 1px solid #334155;
    border-radius: 0px;
    font-size: 0.95rem;
    background: #1e293b;
    color: #f1f5f9;
    transition: all 0.2s;
}
.search-box input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.3);
    background: #0f172a;
}
.stats {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.document-card {
    background: #1e293b;
    border-radius: 0px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: 1px solid #334155;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    opacity: 0;
    animation: cardFadeIn 0.4s ease forwards;
    animation-delay: calc(0.05s * var(--card-index, 0));
}
.document-card:hover {
    transform: translateY(-5px);
    background: #334155;
    border-color: #3b82f6;
    box-shadow: 0 16px 28px rgba(0,0,0,0.3);
}
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.document-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}
.document-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}
.document-description {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.55;
}
.document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    padding: 8px 18px;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    transition: all 0.2s;
    border: 1px solid #3b82f6;
}
.document-link:hover {
    background: #2563eb;
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(59,130,246,0.5);
}
.loading, .no-results {
    text-align: center;
    padding: 3rem;
    background: #1e293b;
    border-radius: 0px;
    grid-column: 1 / -1;
    color: #94a3b8;
}

/* ---------- ABOUT PAGE – PROFILE AT THE TOP, SQUARE ---------- */
.about-detail-section {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(2px);
    padding: 2rem 0 4rem;
    width: 100%;
}

.about-container {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.about-profile {
    flex: 0 0 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.profile-img-square {
    width: 100%;
    max-width: 280px;
    border-radius: 0px;
    object-fit: cover;
    box-shadow: 0 20px 30px rgba(0,0,0,0.4);
    border: 3px solid #3b82f6;
    transition: transform 0.2s;
}

.profile-img-square:hover {
    transform: scale(1.02);
}

/* Social links inside profile column – square buttons */
/* Social links – organized as a grid, clean and square */
.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
    width: 100%;
    margin-top: 0.5rem;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1e293b;
    padding: 10px 12px;
    border-radius: 0px;
    text-decoration: none;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #334155;
    white-space: nowrap;
}

/* On very small screens, allow text to wrap */
@media (max-width: 500px) {
    .icon-link {
        white-space: normal;
        font-size: 0.75rem;
        padding: 8px 8px;
    }
}

.icon-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    border-color: #3b82f6;
    box-shadow: 0 4px 10px rgba(59,130,246,0.3);
}

.icon-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}
.about-text-detail {
    flex: 1;
}
.about-text-detail h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}
.bio-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #cbd5e1;
}
.bio-line svg {
    flex-shrink: 0;
    color: #3b82f6;
    width: 22px;
    height: 22px;
}
.bio-description {
    margin-top: 1.5rem;
    line-height: 1.7;
    font-size: 1.05rem;
    color: #cbd5e1;
}

/* Footer – narrow and square */
footer {
    background: rgba(10, 15, 26, 0.85);
    text-align: center;
    padding: 0.8rem 0;
    color: #64748b;
    font-size: 0.75rem;
    border-top: 1px solid #1e293b;
    width: 100%;
    margin-top: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 800px) {
    .container-wide {
        padding: 0 20px;
    }
    .archive-title {
        font-size: clamp(2rem, 8vw, 4rem);
    }
    .hero-description {
        font-size: 1rem;
    }
    .hero-quote {
        font-size: 0.95rem;
    }
    .hero-buttons {
        gap: 1rem;
    }
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .about-profile {
        flex: 0 0 220px;
    }
    .profile-img-square {
        max-width: 200px;
    }
    .about-text-detail h2 {
        font-size: 2rem;
    }
    .bio-line {
        font-size: 1rem;
    }
    .bio-description {
        font-size: 0.95rem;
    }
    .icon-link {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    .social-links {
        justify-content: center;
    }
}
@media (max-width: 640px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
    .journals-hero, .about-hero {
        min-height: 40vh;
    }
    .document-card {
        padding: 1.2rem;
    }
}