/* ==========================================
   Andreas Levisianos - Refined Design
   Crimson Pro + Space Grotesk
   Monochrome Refined Palette
   ========================================== */

/* ==========================================
   CSS Variables
   ========================================== */
:root {
    /* Colors - Warm Paper Background */
    --color-background: #fdfcfb;
    --color-surface: #f8f7f5;
    --color-border: #e8e6e3;
    --color-text-primary: #1a1816;
    --color-text-secondary: #333130;
    --color-text-tertiary: #666462;
    --color-text-muted: #9a9896;
    
    /* Typography */
    --font-serif: 'Crimson Pro', serif;
    --font-sans: 'Space Grotesk', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    --spacing-2xl: 60px;
    --spacing-3xl: 100px;
    
    /* Transitions */
    --transition-default: 0.3s ease;
    
    /* Layout */
    --sidebar-width: 250px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-background);
    color: var(--color-text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ==========================================
   Canvas Background
   ========================================== */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==========================================
   Mobile Menu
   ========================================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 200;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-overlay nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: var(--spacing-xl);
}

.mobile-menu-overlay nav a {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: var(--font-weight-light);
    letter-spacing: -0.5px;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu-overlay nav a:hover {
    color: var(--color-text-muted);
}

/* ==========================================
   Hero Page (Landing)
   ========================================== */
.page-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--spacing-xl);
}

.hero-header {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

h1 {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    font-weight: var(--font-weight-light);
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 1;
}

.subtitle {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: var(--font-weight-regular);
    letter-spacing: 3px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--spacing-2xl);
}

.hero-nav {
    display: flex;
    gap: 35px;
    margin-top: var(--spacing-xl);
    justify-content: center;  /* Changed from flex-start */
    width: 100%;
}

.hero-nav a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.5px;
    transition: all var(--transition-default);
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}

.hero-nav a:hover {
    border-bottom-color: var(--color-text-primary);
}

/* ==========================================
   Content Pages Layout
   ========================================== */
.content-page {
    display: flex;
    min-height: 100vh;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Sidebar Navigation */
.sidebar-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--spacing-xl);
    border-right: 1px solid var(--color-border);
    z-index: 10;
    background: rgba(248, 247, 245, 0.85);  /* Semi-transparent warm background */
    backdrop-filter: blur(10px);             /* Blur the animation behind it */
}

.sidebar-nav a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-lg);
    transition: all var(--transition-default);
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}

.sidebar-nav a:hover {
    border-bottom-color: var(--color-text-primary);
}

.sidebar-nav a.active {
    font-weight: var(--font-weight-medium);
    border-bottom-color: var(--color-text-primary);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: var(--spacing-3xl) var(--spacing-xl);
    max-width: calc(var(--max-width) + var(--sidebar-width));
}

.main-content-inner {
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================
   Typography - Headings
   ========================================== */
h2 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-2xl);
    letter-spacing: -1.5px;
    line-height: 1.1;
}

h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.5px;
    line-height: 1.3;
}

/* ==========================================
   About Page
   ========================================== */
.content-wrapper {
    max-width: 800px;
}

.bio-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-light);
    margin-bottom: 30px;
}

/* ==========================================
   Works Page - Section Structure
   ========================================== */
.works-section {
    margin-bottom: var(--spacing-3xl);
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
    display: block;
}

.section-toggle {
    cursor: pointer;
    transition: color var(--transition-default);
    user-select: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-toggle:hover {
    color: var(--color-text-primary);
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: var(--font-weight-light);
    display: inline-block;
    width: 20px;
    text-align: center;
}

.section-toggle.collapsed {
    margin-bottom: var(--spacing-md);
}

.section-content {
    display: block;
    transition: opacity 0.3s ease;
}

/* ==========================================
   Works Page - Featured Work Cards
   ========================================== */
.work-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 2px solid var(--color-text-primary);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    transition: all var(--transition-default);
}

.work-card:hover {
    background: #f5f5f5;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.work-header {
    margin-bottom: var(--spacing-md);
}

.work-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.5px;
    line-height: 1.3;
    color: var(--color-text-primary);
}

.work-meta {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-light);
    letter-spacing: 0.5px;
}

.work-description {
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-weight: var(--font-weight-light);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.work-media {
    margin-top: var(--spacing-md);
}

.media-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.media-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: var(--font-weight-light);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-text-muted);
    transition: border-color var(--transition-default);
    padding-bottom: 2px;
}

.media-link:hover {
    border-color: var(--color-text-primary);
}

.work-performances {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.performances-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.work-performances p {
    color: var(--color-text-tertiary);
    font-size: 0.95rem;
    font-weight: var(--font-weight-light);
    line-height: 1.7;
}

/* ==========================================
   Works Page - Filter Buttons
   ========================================== */
.filter-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
}

.filter-btn {
    font-family: var(--font-sans);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: var(--font-weight-light);
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-default);
}

.filter-btn:hover {
    background: #f5f5f5;
    border-color: var(--color-text-secondary);
}

.filter-btn.active {
    background: var(--color-text-primary);
    color: var(--color-background);
    border-color: var(--color-text-primary);
    font-weight: var(--font-weight-regular);
}

/* ==========================================
   Works Page - Filterable Items
   ========================================== */
.filterable-works {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.work-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: var(--spacing-md);
    transition: all var(--transition-default);
}

.work-item:hover {
    background: #f5f5f5;
    border-color: var(--color-text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.work-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--spacing-xs);
    gap: var(--spacing-sm);
}

.work-item-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: var(--font-weight-regular);
    letter-spacing: -0.3px;
    line-height: 1.3;
    color: var(--color-text-primary);
    flex: 1;
}

.work-item-year {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-light);
    white-space: nowrap;
}

.work-item-forces {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    font-weight: var(--font-weight-light);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.work-item-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: var(--font-weight-light);
    letter-spacing: 0.5px;
    transition: color var(--transition-default);
    display: inline-block;
}

.work-item-link:hover {
    color: var(--color-text-primary);
}

/* ==========================================
   Works Page - Complete List Table
   ========================================== */
.complete-list {
    margin-top: var(--spacing-lg);
}

.works-table {
    width: 100%;
    border-collapse: collapse;
}

.works-table thead th {
    font-family: var(--font-sans);
    text-align: left;
    font-size: 0.7rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding-bottom: var(--spacing-sm);
    padding-right: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.works-table thead th:first-child {
    padding-right: var(--spacing-lg);
}

.works-table thead th:nth-child(2) {
    padding-right: var(--spacing-lg);
}

.works-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color var(--transition-default);
}

.works-table tbody tr:hover {
    background: var(--color-surface);
}

.works-table tbody td {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 0;
    font-size: 0.95rem;
    font-weight: var(--font-weight-light);
    color: var(--color-text-secondary);
    vertical-align: top;
}

.works-table tbody td:first-child {
    color: var(--color-text-muted);
    width: 100px;
    padding-right: var(--spacing-lg);
}

.works-table tbody td:nth-child(2) {
    font-family: var(--font-serif);
    padding-right: var(--spacing-lg);
}

.works-table tbody td:nth-child(3) {
    /* Forces column - no width constraint, allows natural width */
}

.works-table tbody td a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-default);
}

.works-table tbody td a:hover {
    color: var(--color-text-muted);
}

/* ==========================================
   Contact Page
   ========================================== */
.contact-page .content-wrapper {
    max-width: 600px;
}

.contact-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-xl);
}

.contact-email {
    margin-top: var(--spacing-xl);
}

.email-link {
    font-family: var(--font-serif);
    color: var(--color-text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--color-text-muted);
    transition: border-color var(--transition-default);
    display: inline-block;
    font-size: 1.3rem;
    padding-bottom: 2px;
}

.email-link:hover {
    border-color: var(--color-text-primary);
}

/* ==========================================
   Accessibility
   ========================================== */
:focus-visible {
    outline: 2px solid var(--color-text-primary);
    outline-offset: 2px;
}

/* ==========================================
   Responsive - Tablet
   ========================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-3xl: 80px;
        --spacing-2xl: 50px;
    }
    
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    .filterable-works {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* ==========================================
   Responsive - Mobile
   ========================================== */
@media (max-width: 768px) {
    :root {
        --spacing-3xl: 60px;
        --spacing-2xl: 40px;
        --spacing-xl: 30px;
    }
    
    h1 {
        font-size: 3rem;
        letter-spacing: -1.5px;
    }
    
    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    h2 {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-xl);
    }
    
    h3 {
        font-size: 1.6rem;
    }
    
    /* Show mobile menu */
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    /* Hide desktop navigation */
    .hero-page .hero-nav {
        display: none;
    }
    
    .sidebar-nav {
        display: none;
    }
    
    /* Full width content */
    .content-page {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: var(--spacing-2xl) var(--spacing-md);
    }
    
    .page-container {
        padding: 0 var(--spacing-md);
    }
    
    .filterable-works {
        grid-template-columns: 1fr;
    }
    
    .work-card,
    .work-item {
        padding: var(--spacing-md);
    }
    
    .bio-text,
    .contact-text {
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* ==========================================
   Responsive - Small Mobile
   ========================================== */
@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    #canvas-container,
    nav,
    .mobile-menu-toggle,
    .mobile-menu-overlay {
        display: none;
    }
    
    .page-container,
    .main-content {
        padding: 0;
    }
    
    .work-card,
    .work-item {
        background: white;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* ==========================================
   Reduced Motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* ==========================================
   Photo Gallery
   ========================================== */
.photo-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.gallery-overlay {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: var(--color-background);
    font-size: 50px;
    cursor: pointer;
    font-weight: var(--font-weight-light);
    font-family: var(--font-sans);
    transition: opacity var(--transition-default);
    line-height: 1;
    padding: 10px;
}

.gallery-close:hover {
    opacity: 0.7;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--color-background);
    font-size: 60px;
    padding: 20px 30px;
    cursor: pointer;
    transition: all var(--transition-default);
    font-weight: var(--font-weight-light);
    font-family: var(--font-sans);
    line-height: 1;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-prev { 
    left: -100px; 
}

.gallery-next { 
    right: -100px; 
}

.gallery-caption {
    color: var(--color-background);
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: var(--font-weight-light);
    font-family: var(--font-sans);
    letter-spacing: 0.5px;
}

.gallery-counter {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-light);
    font-family: var(--font-sans);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .gallery-prev { 
        left: 10px;
        font-size: 40px;
        padding: 15px 20px;
    }
    
    .gallery-next { 
        right: 10px;
        font-size: 40px;
        padding: 15px 20px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
    }
    
    .gallery-image {
        max-width: 95vw;
        max-height: 70vh;
    }
}

/* ==========================================
   Conducting Page - Credits Section
   ========================================== */
.work-credits {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.credits-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.credits-text {
    color: var(--color-text-tertiary);
    font-size: 0.95rem;
    font-weight: var(--font-weight-light);
    line-height: 1.7;
    margin: 0;
}

/* Gallery Video Iframe */
.gallery-video {
    display: none;
    width: 90vw;
    max-width: 1280px;
    height: 50.625vw; /* 16:9 aspect ratio */
    max-height: 720px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .gallery-video {
        width: 95vw;
        height: 53.4375vw; /* 16:9 aspect ratio for mobile */
        max-height: none;
    }
}