@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600&family=Lato:wght@400;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

/* Professional Color Scheme */
:root {
    --primary-dark: #1a1a1a;
    --secondary-dark: #2d2d2d;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --accent-primary: #0F4F3A;
    --accent-secondary: #065f46;
    --background-main: #e8dcc8;
    --background-alt: #e8dcc8;
    --border-color: #0F4F3A;
    --link-color: #0F4F3A;
    --link-hover: #065f46;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-dark: #e8dcc8;
    --secondary-dark: #d4c4a8;
    --text-primary: #e8dcc8;
    --text-secondary: #b8a890;
    --accent-primary: #16a34a;
    --accent-secondary: #22c55e;
    --background-main: #0d0d0d;
    --background-alt: #1a1a1a;
    --border-color: #16a34a;
    --link-color: #22c55e;
    --link-hover: #4ade80;
}

body {
    font-family: 'Lora', Georgia, serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(to bottom right, #e8dcc8 0%, #e8dcc8 49.5%, #0F4F3A 50.5%, #0F4F3A 100%);
    font-size: 16px;
    animation: fadeIn 0.6s ease-in;
    min-height: 100vh;
}

[data-theme="dark"] body {
    background: linear-gradient(to bottom right, #0d0d0d 0%, #0d0d0d 49.5%, #16a34a 50.5%, #16a34a 100%);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
}

/* Page Transition Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    background-color: transparent;
    flex-direction: column;
}

/* Header */
header {
    margin-bottom: 0;
    padding: 30px 40px;
    background-color: var(--primary-dark);
    animation: slideDown 0.5s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.site-title {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 0;
}

.site-title a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
    display: inline-block;
}

.site-title a:hover {
    color: #065f46;
    letter-spacing: 3px;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav li {
    position: relative;
}

nav a {
    color: var(--background-main);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-dark);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 5px;
    border: 1px solid var(--accent-primary);
    padding-top: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, margin-top 0.3s ease;
}

.dropdown-content a {
    color: var(--background-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.dropdown-content a::after {
    display: none;
}

.dropdown-content a:hover {
    background-color: var(--accent-primary);
    color: var(--background-main);
    transform: none;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
    opacity: 1;
    pointer-events: auto;
    margin-top: 0;
}

.dropbtn {
    cursor: pointer;
    padding-bottom: 5px;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 80px 60px;
    animation: fadeInUp 0.7s ease-out 0.2s both;
    background-color: var(--background-main);
}

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

/* Work Sections */
.work-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease-out both;
}

.work-section:nth-child(1) {
    animation-delay: 0.3s;
}

.work-section:nth-child(2) {
    animation-delay: 0.4s;
}

.work-section:nth-child(3) {
    animation-delay: 0.5s;
}

.work-section:nth-child(4) {
    animation-delay: 0.6s;
}

.work-section h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    color: var(--primary-dark);
    text-transform: uppercase;
    padding: 15px;
    border: 2px solid var(--accent-primary);
    border-left: 5px solid var(--accent-primary);
    background-color: rgba(16, 185, 129, 0.05);
}

.work-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.work-item {
    line-height: 1.8;
    transition: transform 0.2s ease, padding-left 0.2s ease;
}

.work-item:hover {
    transform: translateX(5px);
}

.work-item a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.work-item a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    color: var(--accent-primary);
    transition: opacity 0.3s ease, left 0.3s ease;
}

.work-item:hover a::before {
    opacity: 1;
    left: -25px;
}

.work-item a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* About Page */
.about-content {
    max-width: 700px;
}

.about-section h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 30px;
    color: var(--primary-dark);
    text-transform: uppercase;
    padding: 15px;
    border: 2px solid var(--accent-primary);
    border-left: 5px solid var(--accent-primary);
    background-color: rgba(16, 185, 129, 0.05);
}

.about-section h2.large-heading {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 40px;
    padding: 25px;
}

.bio p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.bio p a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.bio p a:hover {
    border-bottom-color: var(--link-color);
}

/* Profile Image */
.profile-image {
    float: none;
    margin: 30px auto;
    max-width: 700px;
    width: 100%;
    clear: both;
}

.profile-image img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Writing page header image - stretch horizontally */
.writing-header-image {
    max-width: 100%;
    width: 100%;
    margin: 30px 0;
}

.writing-header-image img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    object-position: center;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 30px;
}

.image-gallery img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.image-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.credentials {
    margin-top: 40px;
    clear: both;
}

.credentials h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.credentials ul {
    list-style: none;
    padding-left: 0;
}

.credentials li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* Contact Page */
.contact-content {
    max-width: 700px;
}

.contact-section h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 30px;
    color: var(--primary-dark);
    text-transform: uppercase;
    padding: 15px;
    border: 2px solid var(--accent-primary);
    border-left: 5px solid var(--accent-primary);
    background-color: rgba(16, 185, 129, 0.05);
}

.contact-info p {
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item h3 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.contact-item a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.contact-note {
    margin-top: 40px;
    padding: 20px;
    background-color: rgba(16, 185, 129, 0.05);
    border: 2px solid var(--accent-primary);
    border-left: 5px solid var(--accent-primary);
}

.contact-note p {
    line-height: 1.8;
    margin-bottom: 0;
}

/* Writing Page */
.writing-page {
    max-width: 700px;
    animation: fadeInUp 0.6s ease-out both;
}

.writing-page:nth-of-type(1) {
    animation-delay: 0.3s;
}

.writing-page:nth-of-type(2) {
    animation-delay: 0.4s;
}

.writing-page:nth-of-type(3) {
    animation-delay: 0.5s;
}

.page-title {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 50px;
    color: var(--primary-dark);
    padding: 20px;
    border: 3px solid var(--accent-primary);
    border-left: 6px solid var(--accent-primary);
    background-color: rgba(16, 185, 129, 0.05);
}

.writing-group {
    margin-bottom: 55px;
    transition: transform 0.2s ease;
}

.writing-group:hover {
    transform: translateX(3px);
}

.publication-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--secondary-dark);
    text-transform: uppercase;
}

.article-item {
    margin-bottom: 12px;
    padding-left: 0;
    transition: transform 0.2s ease;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-item h4 {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

.article-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
    line-height: 1.6;
}

.article-item a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

/* Section anchors with offset for fixed header */
section[id] {
    scroll-margin-top: 100px;
}

.article-item a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    color: var(--accent-primary);
    transition: opacity 0.3s ease, left 0.3s ease;
}

.article-item:hover a::before {
    opacity: 1;
    left: -25px;
}

.article-item a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 30px 40px;
    text-align: center;
    font-size: 12px;
    color: var(--background-main);
    animation: fadeIn 0.8s ease-out 0.5s both;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--background-main);
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(20deg);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: var(--accent-primary);
    color: var(--background-main);
}

::-moz-selection {
    background-color: var(--accent-primary);
    color: var(--background-main);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    nav ul {
        gap: 20px;
    }
    
    nav a {
        font-size: 12px;
    }
    
    .work-section h2,
    .about-section h2,
    .contact-section h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .site-title {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .profile-image {
        float: none;
        margin: 0 0 30px 0;
        max-width: 100%;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--secondary-dark);
    color: var(--background-main);
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.cookie-content a:hover {
    color: var(--background-main);
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background-color: var(--accent-primary);
    color: var(--background-main);
}

.cookie-btn.accept:hover {
    background-color: var(--accent-secondary);
}

.cookie-btn.reject {
    background-color: transparent;
    color: var(--background-main);
    border: 1px solid var(--background-main);
}

.cookie-btn.reject:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Patreon Page */
.patreon-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

.patreon-content {
    margin-top: 40px;
}

.patreon-content > p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.patreon-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 25px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.patreon-cta {
    text-align: center;
    margin: 40px 0;
}

.patreon-button {
    display: inline-block;
    background-color: var(--accent-primary);
    color: #e8dcc8;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(15, 79, 58, 0.3);
}

.patreon-button:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 79, 58, 0.4);
}

.support-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.benefit-item {
    padding: 25px;
    background-color: rgba(15, 79, 58, 0.05);
    border-radius: 6px;
    border-left: 4px solid var(--accent-primary);
}

.benefit-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.benefit-item p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.patron-tiers {
    margin-top: 30px;
}

.tier-item {
    padding: 30px;
    background-color: rgba(15, 79, 58, 0.08);
    border-radius: 6px;
    margin-bottom: 20px;
}

.tier-item h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.tier-item ul {
    list-style: none;
    padding-left: 0;
}

.tier-item li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tier-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 18px;
}

.patreon-footer {
    font-size: 16px;
    font-style: italic;
    text-align: center;
    margin-top: 50px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .patreon-page {
        padding: 40px 20px;
    }
    
    .support-benefits {
        grid-template-columns: 1fr;
    }
    
    .patreon-button {
        padding: 14px 30px;
        font-size: 16px;
    }
}
