/* 
 * Dianthus - Main Stylesheet
 * A unified stylesheet for the Dianthus personal website
 */

/* ===== FONTS ===== */
@font-face {
    font-family: 'IM FELL FLOWERS 2';
    font-style: normal;
    font-weight: normal;
    src: local('IM FELL FLOWERS 2'), url('im-fell-flowers-2.regular.woff') format('woff');
}

/* ===== BASE STYLES ===== */
body {
    font-family: "IM Fell Great Primer", Georgia, serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #E6D7B7; /* Cream background */
    color: #333;
}

/* ===== LAYOUT ===== */
.container {
    width: 50%;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== NAVIGATION ===== */
nav {
    padding: 1rem 0;
    border-bottom: 1px solid #000;
    background-color: #E6D7B7;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    width: 50%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    position: relative;
    padding: 0.3rem 0;
}

.nav-link:hover, .nav-link:focus {
    color: #D94B25; /* Rusty red color */
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #D94B25; /* Rusty red color */
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after, .nav-link:focus::after {
    transform: scaleX(1);
}

/* ===== MOBILE MENU ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px 0;
    position: relative;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.blur-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 90;
    transition: opacity 0.3s ease;
}

.blur-overlay.active {
    display: block;
}

/* ===== ORNAMENTS ===== */
.flowers-ornament {
    font-family: 'IM FELL FLOWERS 2';
    font-size: 3rem;
    color: black;
    text-align: center;
    display: block;
    margin: 2rem 0;
}

/* ===== PAGE TITLES & SECTIONS ===== */
.title-area {
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.title-separator {
    display: block;
    width: 40px;
    height: 1px;
    background-color: black;
    margin: 1rem auto;
}

.subtitle {
    color: #D94B25;
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-align: center;
}

.section-title {
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    position: relative;
    text-align: center;
}

.subsection-title {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    position: relative;
}

.section-separator {
    margin: 2.5rem 0;
    border: 0;
    height: 1px;
    background-color: #000;
    opacity: 0.2;
}

.section-ornament {
    text-align: center;
    margin: 2rem 0;
}

/* ===== WRITINGS PAGE ===== */
.intro-text {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.article-item {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}

.article-link {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    position: relative;
}

.article-link:hover, .article-link:focus {
    color: #D94B25;
}

.article-date {
    font-style: italic;
    color: #777;
    font-size: 0.9rem;
}

/* ===== LINKS PAGE ===== */
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
}

.links-list li:last-child {
    border-bottom: none;
}

.links-list a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.links-list a:hover, .links-list a:focus {
    color: #D94B25;
}

.link-description {
    font-style: italic;
    color: #555;
    margin-top: 0.3rem;
    padding-left: 1rem;
}

/* ===== ABOUT PAGE ===== */
.content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.content p:first-of-type::first-letter {
    font-size: 3.5rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.2rem;
    color: #D94B25;
}

.content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    display: block;
}

.content i {
    color: #555;
}

.contact-info {
    font-style: italic;
    text-align: center;
    margin: 2rem 0;
    color: #555;
}

/* ===== ARTICLE PAGE ===== */
.post-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-align: center;
}

.post-date {
    color: #D94B25;
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.post-content {
    text-align: justify;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content p:first-of-type::first-letter {
    font-size: 3.5rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.2rem;
    color: #D94B25;
}

.back-button {
    display: block;
    margin: 2rem auto 0;
    padding: 0.5rem 1.2rem;
    background-color: transparent;
    color: #D94B25;
    border: 1px solid #D94B25;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
}

.back-button:hover, .back-button:focus {
    background-color: #D94B25;
    color: white;
    transform: scale(1.05);
}

/* ===== COMING SOON ===== */
.coming-soon {
    text-align: center;
    font-style: italic;
    font-size: 1.5rem;
    margin: 4rem 0;
    color: #555;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-container, .container {
        width: 85%;
        padding: 1rem;
    }
    
    .page-title, .post-title {
        font-size: 1.8rem;
    }
    
    /* Mobile navigation */
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #E6D7B7;
        flex-direction: column;
        padding: 4rem 1.5rem 1.5rem;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 95;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Hamburger menu animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        width: 25px;
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
        width: 25px;
    }
    
    /* Body lock when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* On mobile, left-align text for better readability */
    .content p, .post-content {
        text-align: left;
    }
    
    .title-area {
        margin-bottom: 2rem;
    }
}