/* css/style.css */
:root {
    --bg-color: #030304;
    --surface-color: rgba(14, 14, 18, 0.6);
    --border-color: rgba(238, 198, 67, 0.2);
    --primary-color: #eec643;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --glow: 0 0 15px rgba(238, 198, 67, 0.4);
    --glow-strong: 0 0 30px rgba(238, 198, 67, 0.8);
    --font-heading: 'Georgia', 'Palatino', 'Times New Roman', serif;
    --font-body: 'system-ui', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Background canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: normal;
    margin: 0;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    padding: 0 2rem;
    max-width: 800px;
    animation: fadeIn 2s ease-out;
}

.glow-title {
    font-size: 5rem;
    color: var(--primary-color);
    text-shadow: var(--glow-strong);
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    position: relative;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3.5rem;
    font-weight: 300;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    font-size: 0.9rem;
    background: rgba(238, 198, 67, 0.05);
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: -1;
}

.cta-btn:hover {
    color: #000;
    text-shadow: none;
    box-shadow: var(--glow-strong);
}

.cta-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(238, 198, 67, 0.12) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    animation: pulse 6s infinite alternate ease-in-out;
}

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

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* Library Section */
#library {
    padding: 6rem 5%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    box-shadow: var(--glow);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 0.5rem 0.5rem;
    position: relative;
    transition: color 0.3s;
}

.filter-btn:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    color: var(--primary-color);
}

.filter-btn.active:after {
    width: 100%;
    left: 0;
    box-shadow: var(--glow);
}

/* Manuscript Grid */
.manuscripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    padding: 2rem 0;
    perspective: 1000px;
}

/* Manuscript Card */
.manuscript-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 3rem 2rem;
    text-align: center;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.manuscript-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.manuscript-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(238, 198, 67, 0.05);
    border-color: rgba(238, 198, 67, 0.5);
}

.manuscript-card:hover::before {
    opacity: 1;
}

.m-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    display: block;
}

.m-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.m-author {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

.m-preview {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #777;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card as link — remove default anchor styles */
a.manuscript-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.m-chapters {
    display: block;
    margin-top: 1.2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.m-cta {
    display: inline-block;
    margin-top: 1.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.manuscript-card:hover .m-cta {
    opacity: 1;
    transform: translateY(0);
}

/* About Section */
.about-section {
    padding: 8rem 5%;
    display: flex;
    justify-content: center;
}

.about-card {
    background: rgba(14, 14, 18, 0.4);
    border: 1px solid var(--border-color);
    padding: 5rem 4rem;
    max-width: 800px;
    text-align: center;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.6);
}

.about-card h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.about-card p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
}


@media (max-width: 768px) {
    .glow-title {
        font-size: 3.5rem;
    }

    .about-card {
        padding: 3rem 1.5rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
}
