:root {
    --ink-dark: #2a1f1a;
    --ink-warm: #4a3728;
    --paper-cream: #f7f2e8;
    --paper-light: #f2edde;
    --paper-shadow: #e7dfc9;
    --code-bg: rgba(139, 69, 19, 0.08);
    --accent: #8b4513;
    --link-blue: #3d5a80;
}

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

body {
    font-family: 'Crimson Text', serif;
    color: var(--ink-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(101, 67, 33, 0.5), rgba(139, 69, 19, 0.4)),
        url('images/low-contrast-linen.png');
    background-blend-mode: multiply;
    opacity: 0.4;
    z-index: -1;
}

.journal-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--paper-cream);
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.15),
        inset 0 0 60px rgba(139, 105, 20, 0.03);
    position: relative;
    padding: 60px 80px;
    background-image:
        radial-gradient(circle at 18% 28%, rgba(74, 55, 40, 0.5) 0%, transparent 0.4%),
        radial-gradient(circle at 82% 72%, rgba(74, 55, 40, 0.6) 0%, transparent 0.3%),
        radial-gradient(circle at 68% 18%, rgba(74, 55, 40, 0.5) 0%, transparent 0.2%),
        radial-gradient(circle at 28% 88%, rgba(139, 105, 20, 0.4) 0%, transparent 0.25%);
}

.journal-container::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent 0%,
            var(--ink-warm) 10%,
            var(--ink-warm) 90%,
            transparent 100%);
    opacity: 0.3;
}

.journal-header {
    margin-bottom: 40px;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.title-section {
    flex: 1;
    text-align: center;
}

.profile-photo {
    width: 150px;
    height: 150px;
    background: var(--paper-light);
    padding: 5px;
    transform: rotate(2deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(139, 105, 20, 0.15);
}

.profile-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    filter: sepia(8%) contrast(1.08) brightness(1.01);
}

.journal-title {
    font-family: 'Caveat', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--ink-dark);
    margin-bottom: 10px;
    transform: rotate(-2deg);
    position: relative;
    display: inline-block;
    text-shadow:
        1px 1px 0px rgba(139, 105, 20, 0.1),
        -0.5px 0.5px 0px rgba(42, 31, 26, 0.06);
    /* Enable OpenType handwriting alternates */
    font-feature-settings: "calt" 1, "liga" 1, "clig" 1;
    letter-spacing: 0.02em;
}

.journal-subtitle {
    font-style: italic;
    color: var(--ink-warm);
    font-size: 1.2rem;
    opacity: 0.8;
}

.journal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-cta {
    flex-shrink: 0;
}

.cta-button {
    font-family: 'Caveat', serif;
    font-size: 1.2rem;
    color: var(--paper-cream);
    background: var(--accent);
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 20px;
    transform: rotate(-2deg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(139, 105, 20, 0.4);
}

.cta-button:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.nav-link {
    font-family: 'Caveat', serif;
    font-size: 1.4rem;
    color: var(--ink-warm);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.journal-section {
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Caveat', serif;
    font-size: 2.5rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '§';
    position: absolute;
    left: -30px;
    color: var(--accent);
    opacity: 0.5;
}

.entries {
    margin-left: 20px;
}

.entry {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--paper-light);
    border-radius: 3px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(139, 105, 20, 0.12);
}

.entry:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.entry h3 {
    font-family: 'Caveat', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--ink-dark);
}

.entry-date {
    font-size: 0.9rem;
    color: var(--ink-warm);
    font-style: italic;
    margin-bottom: 10px;
    opacity: 0.7;
}

.entry p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-links {
    margin-top: 15px;
    display: flex;
    gap: 20px;
}

.project-link {
    color: var(--link-blue);
    text-decoration: none;
    font-family: 'Caveat', serif;
    font-size: 1.2rem;
    position: relative;
}

.project-link:hover {
    text-decoration: underline;
}



.journal-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px dashed rgba(139, 69, 19, 0.2);
    text-align: center;
}

.contact-section {
    margin-bottom: 30px;
}

.contact-title {
    font-family: 'Caveat', serif;
    font-size: 1.8rem;
    color: var(--ink-dark);
    margin-bottom: 15px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--link-blue);
    text-decoration: none;
    font-family: 'Caveat', serif;
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
    opacity: 0.8;
}

.contact-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
    opacity: 1;
}

.contact-link svg {
    width: 20px;
    height: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-link {
    display: inline-block;
    color: var(--link-blue);
    transition: color 0.3s ease, transform 0.3s ease;
    opacity: 0.6;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
    opacity: 1;
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.interest-entry {
    cursor: pointer;
}

@media (max-width: 768px) {
    .journal-container {
        padding: 40px 30px;
    }

    .journal-container::before {
        left: 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .title-section {
        order: 2;
    }

    .profile-photo {
        order: 1;
        width: 130px;
        height: 130px;
        padding: 4px;
        transform: rotate(1deg);
        margin: 0 auto;
    }

    .profile-img {
        width: 122px;
        height: 122px;
    }

    .journal-title {
        font-size: 2.5rem;
    }

    .journal-nav {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-links {
        order: 2;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .nav-cta {
        order: 1;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .cta-button {
        font-size: 1.3rem;
        padding: 10px 25px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}