@import url('https://fonts.bunny.net/css?family=cinzel:400,600,700|cormorant-garamond:300,400,500');

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: #0a0a0a;
    color: #e8d5b7;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 35px; /* Much smaller for ultra-compact header */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 50px,
            rgba(139, 109, 66, 0.02) 50px,
            rgba(139, 109, 66, 0.02) 100px
        );
    pointer-events: none;
    z-index: 1;
}

/* Glassmorphic Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4px 32px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

.header-logo:hover {
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6)) 
            drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
    transform: scale(1.05);
}

.header-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #d4af37;
    margin: 0;
    letter-spacing: 0.05em;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.6), 0 0 15px rgba(212, 175, 55, 0.4);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    padding: 2rem 0 3rem;
    position: relative;
}

.subtitle {
    font-size: 1.3rem;
    color: #a89968;
    font-style: italic;
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    margin: 1rem 0;
}

.badge img {
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
    transition: filter 0.3s ease;
}

.badge img:hover {
    filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 12px rgba(212, 175, 55, 0.5));
}

.ornament {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 2rem auto;
    position: relative;
}

.ornament::before,
.ornament::after {
    content: '◆';
    position: absolute;
    color: #d4af37;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.ornament::before {
    left: -20px;
}

.ornament::after {
    right: -20px;
}

.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.2rem;
    color: #c9b896;
}

.section {
    margin: 4rem 0;
    padding: 2rem;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 110px; /* Increased offset so sections appear below header with comfortable spacing */
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #d4af37, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
}

.section:hover::before {
    opacity: 1;
}

h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #d4af37;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h2 .emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.resource-list {
    list-style: none;
    padding: 0;
}

.resource-item {
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(30, 30, 30, 0.4);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.resource-item:hover {
    background: rgba(40, 40, 40, 0.6);
    border-left-color: #d4af37;
    transform: translateX(5px);
}

.resource-item a {
    color: #e8d5b7;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.resource-item a::before {
    content: '▸';
    color: #d4af37;
    font-size: 0.8rem;
}

.resource-item a:hover {
    color: #d4af37;
}

.resource-description {
    color: #a89968;
    font-size: 0.95rem;
    margin-left: 1.3rem;
    margin-top: 0.3rem;
}

.coming-soon {
    text-align: center;
    color: #8b6d42;
    font-style: italic;
    padding: 2rem;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 4rem 0 2rem;
    color: #8b6d42;
    font-size: 0.95rem;
}

footer a {
    color: #a89968;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #d4af37;
}

.toc {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
}

.toc h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin-bottom: 1.5rem;
    text-align: center;
}

.toc-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem 1rem;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    color: #c9b896;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    color: #d4af37;
    border-left-color: #d4af37;
    padding-left: 0.75rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8b6d42, #d4af37);
    color: #0a0a0a;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* Codeberg Ribbon Banner */
.codeberg-ribbon {
    position: fixed;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    overflow: hidden;
    z-index: 2000;
    text-decoration: none;
}

.codeberg-ribbon span {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
    padding: 15px 0;
    background-color: #2185d0;
    color: white;
    font-size: 15px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-align: center;
    justify-content: center;
    transform: rotate(45deg);
    top: 50px;
    right: -70px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.codeberg-ribbon img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.codeberg-ribbon:hover span {
    background-color: #1678c2;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(33, 133, 208, 0.6),
        0 0 40px rgba(33, 133, 208, 0.4);
}

@media (max-width: 768px) {
    body {
        padding-top: 30px;
    }
    
    .header-content {
        padding: 3px 16px;
        gap: 0.75rem;
    }
    
    .header-logo {
        width: 50px;
        height: 50px;
    }
    
    .header-title {
        font-size: 1.4rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .toc-list {
        grid-template-columns: 1fr;
    }
    
    .codeberg-ribbon {
        width: 150px;
        height: 150px;
    }
    
    .codeberg-ribbon span {
        width: 240px;
        padding: 12px 0;
        font-size: 13px;
        top: 40px;
        right: -60px;
    }
    
    .codeberg-ribbon img {
        width: 20px;
        height: 20px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }
.section:nth-child(6) { animation-delay: 0.6s; }
.section:nth-child(7) { animation-delay: 0.7s; }
.section:nth-child(8) { animation-delay: 0.8s; }
.section:nth-child(9) { animation-delay: 0.9s; }