/* Portfolio Site Styles */

/* Sunny Theme - CSS Custom Properties */
:root {
    /* Background Colors */
    --bg-primary: #FFFBF5;        /* Warm cream background */
    --bg-surface: #FFFFFF;        /* White surface for cards */
    --bg-footer: #3E2C1E;         /* Warm dark brown footer */

    /* Text Colors */
    --text-primary: #3E2C1E;      /* Warm dark brown for headings/primary text */
    --text-secondary: #8B7355;    /* Medium warm brown for secondary text */
    --text-on-dark: #FFFBF5;      /* Light text on dark backgrounds */

    /* Accent Colors */
    --accent-primary: #F4A460;    /* Sandy brown/warm orange for accents */
    --accent-hover: #E68A3A;      /* Darker warm orange for hover states */
    --accent-light: #FFD7A8;      /* Light peach for subtle accents */

    /* Border & Shadow */
    --border-color: #E8D4BE;      /* Warm beige borders */
    --shadow-light: rgba(62, 44, 30, 0.08);
    --shadow-medium: rgba(62, 44, 30, 0.12);
    --shadow-hover: rgba(62, 44, 30, 0.18);

    /* Form Status Colors */
    --success-bg: #F0F8E8;        /* Warm light green */
    --success-text: #2D5016;      /* Dark green */
    --success-border: #D4E8C3;    /* Light green border */
    --error-bg: #FFF0ED;          /* Warm light red */
    --error-text: #8B1E0F;        /* Dark red */
    --error-border: #FACCC3;      /* Light red border */

    /* Interactive Elements */
    --input-border: #D4C4B0;      /* Input border color */
    --input-focus: #F4A460;       /* Input focus color */
}

/* Dark Theme - Activated via html.dark-mode class */
html.dark-mode {
    /* Background Colors */
    --bg-primary: #1a1612;        /* Dark warm brown background */
    --bg-surface: #2a2218;        /* Slightly lighter brown for cards */
    --bg-footer: #0f0d0a;         /* Very dark footer */

    /* Text Colors */
    --text-primary: #f5ede3;      /* Light warm cream text */
    --text-secondary: #c8b898;    /* Muted warm beige */
    --text-on-dark: #f5ede3;      /* Same as primary in dark mode */

    /* Accent Colors */
    --accent-primary: #f5b855;    /* Brighter golden orange for visibility */
    --accent-hover: #ffc870;      /* Lighter golden on hover */
    --accent-light: #d4a05f;      /* Muted gold */

    /* Border & Shadow */
    --border-color: #3a332a;      /* Dark warm border */
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.5);

    /* Form Status Colors */
    --success-bg: #2a3520;        /* Dark green background */
    --success-text: #a8c896;      /* Light green text */
    --success-border: #3a4a2f;    /* Dark green border */
    --error-bg: #3a2520;          /* Dark red background */
    --error-text: #e8a89a;        /* Light red text */
    --error-border: #4a352f;      /* Dark red border */

    /* Interactive Elements */
    --input-border: #4a3f2f;      /* Darker input border */
    --input-focus: #f5b855;       /* Bright golden focus */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Header */
.site-header {
    background-color: var(--bg-surface);
    box-shadow: 0 2px 4px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-primary);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Home Page */
.home {
    text-align: center;
    padding: 4rem 0;
}

.home h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.home-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-medium);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow-hover);
    border-color: var(--accent-light);
}

.gallery-item a {
    text-decoration: none;
    color: inherit;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.gallery-item h2 {
    padding: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.gallery-item p {
    padding: 0 1rem 1rem;
    color: var(--text-secondary);
}

/* Single Page */
.single-page {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.single-page h1 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.featured-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.content {
    margin-top: 2rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Contact Form */
.contact-page {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-medium);
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--input-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--input-focus);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--accent-primary);
    color: var(--text-on-dark);
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Form Status Messages */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.form-status.success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 2px solid var(--success-border);
    display: block;
}

.form-status.error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 2px solid var(--error-border);
    display: block;
}

/* Footer */
.site-footer {
    background-color: var(--bg-footer);
    color: var(--text-on-dark);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.site-footer a {
    color: var(--accent-light);
    margin: 0 0.5rem;
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Theme Toggle Button */
#themeToggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#themeToggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

#themeToggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Theme toggle icon */
.theme-icon {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .home h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    #themeToggle {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }
}
