/*
Theme Name: Elsa Leo Theme
Theme URI: https://example.com/elsa-leo-theme 
Description: Artist portfolio theme for Elsa Leo.
Author: Eliot Kristofer Axelsson B.XYZ
Author URI: https://bosmanxyz.xyz 
Version: 2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elsa-leo-theme
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Global Margin */
    --margin-global: 1rem;
    
    /* Typography - Golden Ratio Scale (1.618) */
    --font-size-xs: 0.618rem;      /* ~10px - smaller than base */
    --font-size-s: 1rem;           /* Base: 16px */
    --font-size-m: 1.618rem;       /* ~26px */
    --font-size-l: 2.618rem;       /* ~42px */
    --font-size-xl: 4.236rem;      /* ~68px */
    
    /* Colors */
    --color-text: #5C4A47;         /* Brown from image 1 */
    --color-bg: #EEEBE8;           /* Light gray/beige from image 2 */
    --color-border: #5C4A47;
    
    /* Proportions from Figma */
    --window-image-height: 66.67vh; /* 2/3 of viewport height */
    
    /* SVG Arrows */
    --arrow-down: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 8 31" fill="none"><path d="M4.03568 30.3536C3.84042 30.5488 3.52384 30.5488 3.32857 30.3536L0.146594 27.1716C-0.0486683 26.9763 -0.0486683 26.6597 0.146594 26.4645C0.341856 26.2692 0.658439 26.2692 0.853701 26.4645L3.68213 29.2929L6.51055 26.4645C6.70582 26.2692 7.0224 26.2692 7.21766 26.4645C7.41292 26.6597 7.41292 26.9763 7.21766 27.1716L4.03568 30.3536ZM3.68213 0L4.18213 2.26093e-08L4.18213 30L3.68213 30L3.18213 30L3.18213 -2.26093e-08L3.68213 0Z" fill="%23584B49"/></svg>');
    --arrow-up: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 8 31" fill="none"><path d="M4.03568 0.146445C3.84042 -0.0488175 3.52384 -0.0488174 3.32857 0.146445L0.146594 3.32843C-0.0486683 3.52369 -0.0486683 3.84027 0.146594 4.03553C0.341856 4.23079 0.658438 4.23079 0.853701 4.03553L3.68213 1.2071L6.51055 4.03553C6.70582 4.23079 7.0224 4.23079 7.21766 4.03553C7.41292 3.84027 7.41292 3.52369 7.21766 3.32843L4.03568 0.146445ZM3.68213 30.5L4.18213 30.5L4.18213 0.499998L3.68213 0.499998L3.18213 0.499998L3.18213 30.5L3.68213 30.5Z" fill="%23584B49"/></svg>');
    --arrow-right: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 31 8" fill="none"><path d="M30.3536 4.03556C30.5488 3.8403 30.5488 3.52372 30.3536 3.32845L27.1716 0.146473C26.9763 -0.0487892 26.6597 -0.0487892 26.4645 0.146473C26.2692 0.341735 26.2692 0.658318 26.4645 0.85358L29.2929 3.68201L26.4645 6.51043C26.2692 6.7057 26.2692 7.02228 26.4645 7.21754C26.6597 7.4128 26.9763 7.4128 27.1716 7.21754L30.3536 4.03556ZM0 3.68201V4.18201H30V3.68201V3.18201H0V3.68201Z" fill="%23584B49"/></svg>');
    --arrow-left: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 31 8" fill="none"><path d="M0.146445 3.32845C-0.0488174 3.52371 -0.0488175 3.8403 0.146445 4.03556L3.32842 7.21754C3.52369 7.4128 3.84027 7.4128 4.03553 7.21754C4.23079 7.02228 4.23079 6.70569 4.03553 6.51043L1.2071 3.682L4.03553 0.853577C4.23079 0.658315 4.23079 0.341733 4.03553 0.146471C3.84027 -0.0487915 3.52369 -0.0487916 3.32843 0.146471L0.146445 3.32845ZM30.5 3.68201L30.5 3.18201L0.499998 3.182L0.499998 3.682L0.499998 4.182L30.5 4.18201L30.5 3.68201Z" fill="%23584B49"/></svg>');
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@font-face {
    font-family: 'Junicode';
    src: url('assets/fonts/Junicode.woff2') format('woff2'),
         url('assets/fonts/Junicode.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Junicode', serif;
    font-size: var(--font-size-s);
    line-height: 1.4;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

/* ============================================
   HEADER - STICKY
   ============================================ */
header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: var(--margin-global);
}

.site-title {
    font-size: var(--font-size-m);
    text-decoration: none;
    color: var(--color-text);
    font-weight: normal;
}

nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    line-height: 1.2;
}

nav a {
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--font-size-s);
    font-weight: normal;
}

/* Hamburger menu button - hidden by default */
.menu-toggle {
    display: none;
}

/* Mobile menu overlay - hidden by default */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #5C4A47;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-overlay.is-open {
    opacity: 1;
}

/* Change menu icon and site title color when overlay is open */
.menu-toggle.is-active .menu-icon {
    background-color: var(--color-bg);
}

body.menu-active .site-title {
    color: var(--color-bg);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    line-height: 1.2;
    padding-right: var(--margin-global);
}

.mobile-nav a {
    text-decoration: none;
    color: var(--color-bg);
    font-size: var(--font-size-l);
    font-weight: normal;
    opacity: 0;
    transform: translateY(20px);
}

/* ============================================
   WINDOW SECTION
   ============================================ */
.window {
    width: 100vw;
    max-width: 100dvw;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--margin-global);
    position: relative;
}

/* Only apply height constraints to front page */
body.home,
body.page-template-default {
    overflow: hidden;
    height: 100vh;
    max-height: 100dvh;
}

body.home .content,
body.page-template-default .content {
    overflow: hidden;
    height: 100vh;
    max-height: 100dvh;
}

.window-image {
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.window-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 66.67vh;
    object-fit: contain;
    cursor: pointer;
    display: block;
}

.window-text {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: var(--margin-global);
}

.window-text figcaption {
    font-size: var(--font-size-s);
    line-height: 1.3;
    max-width: 70%;
    text-align: left;
}

.window-text .top-link {
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--font-size-s);
    white-space: nowrap;
    display: none; /* Hidden on window section, shown on others */
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
#scroll-up {
    position: fixed;
    bottom: var(--margin-global);
    right: var(--margin-global);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 999;
    padding: 0;
    width: 8px;
    height: 31px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#scroll-up svg {
    width: 8px;
    height: 31px;
    display: block;
}

#scroll-up .tooltip {
    font-size: var(--font-size-s);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   WORK SECTION
   ============================================ */
#work-section {
    width: 100%;
    min-height: 100vh;
    background: var(--color-bg);
}

.work-section {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.years-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vh, 2rem);
    justify-content: center;
    min-height: 100vh;
}

.year-group {
    width: 100%;
}

.year-link {
    font-size: clamp(2rem, 5vw, var(--font-size-xl));
    cursor: pointer;
    font-weight: normal;
    color: var(--color-text);
    text-decoration: none;
    display: block;
    margin: 0 0 clamp(1.5rem, 3vw, 3rem) 0;
    line-height: 1;
    text-align: center;
}

.year-content {
    display: block;
    opacity: 1;
}

.work-item {
    margin-bottom: clamp(2rem, 4vw, 4rem);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.work-item h3 {
    margin-bottom: 1rem;
    font-weight: normal;
    font-size: var(--font-size-s);
    text-align: center;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery {
    position: relative;
    width: 100%;
    margin: 0 auto 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery img {
    width: auto;
    max-width: 100%;
    max-height: 60vh;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.gallery figcaption {
    margin-top: 0.5rem;
    font-size: var(--font-size-s);
    line-height: 1.3;
    width: 100%;
    text-align: left;
}

/* Gallery nav styles moved to responsive.css for mobile */

/* inga horisontella gallerier */

.single-gallery .gallery-item {
    display: block;
    opacity: 1;
}

@media screen and (min-width: 60rem) {

.single-gallery .gallery-item {
    display: block;
    opacity: 1;
    margin-bottom: 4rem;
}

}

/* ============================================
   CV & CONTACT SECTIONS
   ============================================ */
#cv-section,
#contact-section {
    width: 100%;
    min-height: 100vh;
    background: var(--color-bg);
    box-sizing: border-box;
}

.cv-content,
.contact-columns {
    width: 100%;
    margin: 0 auto;
}

.contact-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.left-column a {
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--font-size-s);
}

.right-column img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   RESPONSIVE - TABLET & DESKTOP
   ============================================ */
@media (min-width: 768px) {
    .contact-columns {
        grid-template-columns: 0.3fr 0.7fr;
    }
    
    .gallery-nav.prev {
        left: -5rem;
    }
    
    .gallery-nav.next {
        right: -5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --margin-global: 2rem;
    }
}

/* ============================================
   SINGLE WORK POST
   ============================================ */
.single-work {
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding: calc(var(--margin-global) * 1) var(--margin-global) var(--margin-global);
    text-align: center;
}

.work-single h1 {
    font-size: var(--font-size-l);
    font-weight: normal;
    text-align: center;
    margin-bottom: 2rem;
}

.work-single .main-headline {
    font-size: var(--font-size-m);
    text-align: center;
    margin-bottom: 3rem;
}

.work-single .work-image {
    margin-bottom: 3rem;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
}

.work-single .work-image img {
    max-width: 100%;
    max-height: 66.67vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.work-single .work-image figcaption {
    margin-top: 0.5rem;
    font-size: var(--font-size-s);
    text-align: left;
    width: 100%;
}

/* Back to work tooltip - only on single work pages */
body.single-work #scroll-up .back-tooltip {
    font-size: var(--font-size-s);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: calc(100% + 0.5rem);
    bottom: 0;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.content {
    width: 100%;
    margin: 0;
    padding: 0;
}

ol, ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
