/* Google Fonts - Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');

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

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 20px;
}

/* Theme: Light Mode (default) */
body.light {
    background-color: #ffffff;
    color: #000000;
}

/* Theme: Dark Mode */
body.dark {
    background-color: #000000;
    color: #ffffff;
}

/* Typography */
.typewriter {
    font-family: 'Open Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 10vw, 6rem);
    text-align: center;
    max-width: 90vw;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 4px;
    height: 0.9em;
    background-color: currentColor;
    margin-left: 4px;
    vertical-align: baseline;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Toggle Button */
.toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.toggle-btn:hover {
    transform: scale(1.1);
}

body.light .toggle-btn {
    border-color: #000000;
    color: #000000;
}

body.dark .toggle-btn {
    border-color: #ffffff;
    color: #ffffff;
}

.toggle-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Icon visibility */
.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

body.dark .sun-icon {
    display: block;
}

body.dark .moon-icon {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toggle-btn {
        width: 44px;
        height: 44px;
        top: 15px;
        right: 15px;
    }

    .toggle-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Scroll Arrow */
.scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    animation: bounce 2s infinite;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-arrow.flipped {
    transform: translateX(-50%) rotate(180deg);
    animation: none;
}

.scroll-arrow svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
}

.scroll-arrow:hover {
    opacity: 0.7;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-15px);
    }

    60% {
        transform: translateX(-50%) translateY(-8px);
    }
}

/* Pages Navigation Section */
.pages-nav {
    width: 100%;
    max-width: 800px;
    padding: 40px 20px 20px;
}

.page-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 16px 24px;
    border: 2px solid currentColor;
    border-radius: 8px;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.page-link:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Section Divider */
.section-divider {
    width: 100%;
    max-width: 800px;
    border: none;
    border-top: 1px solid currentColor;
    opacity: 0.3;
    margin: 20px auto 0;
}

/* Directory Section */
.directory {
    width: 100%;
    max-width: 800px;
    padding: 20px 20px 60px;
}

.directory h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

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

.directory-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid currentColor;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.directory-item:hover {
    opacity: 1;
}

.directory-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.directory-item a {
    color: inherit;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

.directory-item a:hover {
    text-decoration: underline;
}

.directory-item .description {
    font-size: 0.9rem;
    opacity: 0.7;
    font-style: italic;
}

.directory-item .date {
    font-size: 0.9rem;
    opacity: 0.6;
    white-space: nowrap;
}

.no-pages {
    text-align: center;
    opacity: 0.6;
    font-style: italic;
}