/*
Theme Name: ESM Portfolio
Theme URI: https://lookoverhere.xyz/esm
Author: Elliot Spencer Morgan
Description: Mobile-centric portfolio theme for Elliot Spencer Morgan
Version: 1.0
Text Domain: esm-portfolio
*/

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

:root {
    --primary-color: #000000;
    --secondary-color: #666666;
    --background-color: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --mobile-margin: 16px;
    --tablet-margin: 24px;
    --desktop-margin: 32px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    line-height: 1.3;
}

/* Header - Transparent */
.site-header {
    background: transparent;
    padding: 1rem var(--mobile-margin);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(-60px); /* Move header up, hiding title and logo */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* Brand Container - Title above Logo */
.brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.site-header.scrolled .brand-container {
    opacity: 0; /* Hide brand container when scrolled */
    visibility: hidden;
}

/* Site Title - Add Playfair Display font */
.site-title {
    font-size: 1rem; /* Smaller than before */
    font-weight: 400;
    margin-bottom: 0.25rem; /* Space between title and logo */
    font-family: 'Playfair Display', serif;
    transition: all 0.3s ease;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
}

/* Site Logo */
.site-logo {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.site-logo-image {
    height: 30px; /* Smaller logo to fit with title */
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.logo-link:hover .site-logo-image {
    opacity: 0.8;
}

/* Hamburger Menu - Stays fixed when scrolled */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    margin-top: 0.5rem; /* Align with brand content */
    position: relative; /* Ensure it stays in the flow */
    transition: margin-top 0.3s ease;
}

.site-header.scrolled .menu-toggle {
    margin-top: 1rem; /* Adjust position when header moves up */
}

.hamburger {
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin: 2rem 0;
}

.mobile-menu a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--secondary-color);
}

/* Main content area - PUSHED DOWN BELOW HEADER */
.site-main {
    margin-top: 90px; /* Increased from 80px to accommodate title + logo */
}

/* Homepage - Full image display with margins */
.homepage-container {
    max-width: 100%;
    margin: 0;
    padding: 0 var(--mobile-margin);
}

.artwork-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.artwork-item {
    width: 100%;
    margin-bottom: 0;
}

.artwork-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.artwork-image-container {
    width: 100%;
    height: calc(100vh - 90px - var(--mobile-margin) * 2); /* Adjusted for new header height */
    overflow: hidden;
    margin: var(--mobile-margin) 0;
}

.artwork-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures full image is visible */
    display: block;
    background: #f8f8f8; /* Subtle background for letterboxing */
}

.artwork-info {
    padding: 0.5rem var(--mobile-margin) 2rem; /* Top: 0.5rem, Bottom: 2rem */
    background: var(--background-color);
    margin-top: -1.5rem; /* Pulls title much closer to image above */
}

.artwork-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 400;
    margin: 0;
    text-align: center;
}

/* Archive/Index Page - Same full image treatment */
.artwork-archive {
    max-width: 100%;
    margin: 0;
    padding: 0 var(--mobile-margin);
}

.artwork-archive .artwork-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.artwork-archive .artwork-item {
    width: 100%;
    margin-bottom: 0;
}

.artwork-archive .artwork-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.artwork-archive .artwork-image-container {
    width: 100%;
    height: calc(100vh - 90px - var(--mobile-margin) * 2); /* Adjusted for new header height */
    overflow: hidden;
    margin: var(--mobile-margin) 0;
}

.artwork-archive .artwork-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f8f8f8;
}

.artwork-archive .artwork-info {
    padding: 0.5rem var(--mobile-margin) 2rem; /* Top: 0.5rem, Bottom: 2rem */
    background: var(--background-color);
    margin-top: -1.5rem; /* Pulls title much closer to image above */
}

.artwork-archive .artwork-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 400;
    margin: 0;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    padding: 2rem var(--mobile-margin);
    background: var(--background-color);
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a,
.nav-links span {
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.nav-links .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* No artworks message */
.no-artworks {
    text-align: center;
    padding: 4rem var(--mobile-margin);
    background: var(--background-color);
}

.no-artworks p {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Pages */
.page-content {
    padding: 2rem var(--mobile-margin);
    max-width: 600px;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 400;
}

.about-page p,
.contact-page p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.statement-section h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin-bottom: 1rem;
}

.contact-details strong {
    font-weight: 400;
}

/* Single Post Pages */
.artwork-post {
    padding: 2rem var(--mobile-margin);
    max-width: 1000px;
    margin: 0 auto;
}

.artwork-post .artwork-image {
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.artwork-info-post {
    text-align: center;
}

.artwork-info-post h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.view-original {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    border: 1px solid var(--secondary-color);
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    font-weight: 300;
}

.view-original:hover {
    background: var(--secondary-color);
    color: white;
}

/* Footer */
.site-footer {
    background: var(--background-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 2rem var(--mobile-margin);
    font-weight: 300;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .site-header {
        padding: 1rem var(--tablet-margin);
    }
    
    .site-header.scrolled {
        transform: translateY(-65px); /* Slightly more on tablet */
    }
    
    .site-title {
        font-size: 1.125rem; /* Slightly larger on tablet */
    }
    
    .site-logo-image {
        height: 35px; /* Slightly larger on tablet */
    }
    
    .homepage-container {
        padding: 0 var(--tablet-margin);
    }
    
    .artwork-image-container {
        height: calc(100vh - 90px - var(--tablet-margin) * 2);
        margin: var(--tablet-margin) 0;
    }
    
    .artwork-info {
        padding: 0.5rem var(--tablet-margin) 2.5rem; /* Top: 0.5rem, Bottom: 2.5rem */
        margin-top: -2rem; /* Pulls title even closer on tablet */
    }
    
    .artwork-title {
        font-size: 2rem;
    }
    
    .artwork-archive {
        padding: 0 var(--tablet-margin);
    }
    
    .artwork-archive .artwork-image-container {
        height: calc(100vh - 90px - var(--tablet-margin) * 2);
        margin: var(--tablet-margin) 0;
    }
    
    .artwork-archive .artwork-info {
        padding: 0.5rem var(--tablet-margin) 2.5rem; /* Top: 0.5rem, Bottom: 2.5rem */
        margin-top: -2rem; /* Pulls title even closer on tablet */
    }
    
    .artwork-archive .artwork-title {
        font-size: 2rem;
    }
    
    .page-content {
        padding: 2rem var(--tablet-margin);
    }
    
    .page-content h1 {
        font-size: 3rem;
    }
    
    .pagination {
        padding: 2rem var(--tablet-margin);
    }
    
    .site-footer {
        padding: 2rem var(--tablet-margin);
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .site-header {
        padding: 1rem var(--desktop-margin);
    }
    
    .site-header.scrolled {
        transform: translateY(-70px); /* Slightly more on desktop */
    }
    
    .site-title {
        font-size: 1.25rem; /* Slightly larger on desktop */
    }
    
    .site-logo-image {
        height: 40px; /* Slightly larger on desktop */
    }
    
    .homepage-container {
        padding: 0 var(--desktop-margin);
    }
    
    .artwork-image-container {
        height: calc(100vh - 90px - var(--desktop-margin) * 2);
        margin: var(--desktop-margin) 0;
    }
    
    .artwork-info {
        padding: 0.5rem var(--desktop-margin) 3rem; /* Top: 0.5rem, Bottom: 3rem */
        margin-top: -2rem; /* Pulls title even closer on desktop */
    }
    
    .artwork-archive {
        padding: 0 var(--desktop-margin);
    }
    
    .artwork-archive .artwork-image-container {
        height: calc(100vh - 90px - var(--desktop-margin) * 2);
        margin: var(--desktop-margin) 0;
    }
    
    .artwork-archive .artwork-info {
        padding: 0.5rem var(--desktop-margin) 3rem; /* Top: 0.5rem, Bottom: 3rem */
        margin-top: -2rem; /* Pulls title even closer on desktop */
    }
    
    .page-content {
        padding: 2rem var(--desktop-margin);
    }
    
    .pagination {
        padding: 2rem var(--desktop-margin);
    }
    
    .site-footer {
        padding: 2rem var(--desktop-margin);
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .artwork-list {
        max-width: 1200px;
        margin: 0 auto;
    }

    .artwork-archive .artwork-list {
        max-width: 1200px;
        margin: 0 auto;
    }
}