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

body {
    background: var(--bg-darkest);
}

:root {
    --space-xs: 10px;
    --space-sm: 15px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 40px;
    
    --bg-darkest: #0a0a0a;
    --bg-darker: #111;
    --bg-dark: #000;
    
    --border-color: #333;
    --border-light: #444;
    
    --text-primary: #ccc;
    --text-secondary: #aaa;
    --text-muted: #888;
    --text-dim: #666;
    --text-white: #fff;
    --text-bright: #e8e8e8;
}

body {
    font-family: 'Georgia', serif;
    background: var(--bg-darkest);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    background: linear-gradient(180deg, #1a1a2e 0%, var(--bg-darkest) 100%);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--text-bright);
}

header h1 a {
    color: var(--text-bright);
    text-decoration: none;
}

header h1 a:hover {
    color: var(--text-white);
}

nav {
    background: var(--bg-darker);
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
    padding: 5px 10px;
}

nav a:hover,
nav a.active {
    color: var(--text-white);
}

nav a:active {
    color: var(--text-muted);
}

nav a:focus {
    outline: none;
}

@media (hover: none) and (pointer: coarse) {
    nav a:hover {
        color: var(--text-muted);
    }
    
    nav a:active {
        color: var(--text-muted);
    }
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.pswp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.pswp-gallery a {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.pswp-gallery a img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s;
    display: block;
}

.pswp-gallery a:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

.biography {
    background: var(--bg-darker);
    padding: var(--space-xl);
    border: 1px solid var(--border-color);
}

.bio-layout {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.bio-portrait {
    flex-shrink: 0;
}

.bio-portrait img {
    max-width: 300px;
    height: auto;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.bio-content {
    flex: 1;
}

.biography h2 {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 40px 0 20px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.bio-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.bio-content .intro {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ddd;
}

.exhibitions {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px 20px;
    margin-bottom: 30px;
}

.exhibitions .year {
    font-weight: 600;
    color: var(--text-primary);
    grid-column: 1;
}

.exhibitions .event {
    color: var(--text-muted);
    grid-column: 2;
    margin-bottom: 10px;
}

.one-man {
    margin: 30px 0;
    font-style: italic;
    color: var(--text-muted);
}

.awards .award {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: #999;
    line-height: 1.6;
}

.gallery-viewer {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.thumbnails-panel {
    width: 160px;
    flex-shrink: 0;
    overflow-y: auto;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 10px;
}

.thumbnails-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.thumbnails-track .thumb {
    width: 100%;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, border-color 0.3s;
    border: 2px solid transparent;
}

.thumbnails-track .thumb:hover {
    opacity: 0.8;
}

.thumbnails-track .thumb.active {
    opacity: 1;
    border-color: var(--text-dim);
}

.fullsize-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 20px;
    position: relative;
}

.fullsize-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
    z-index: 5;
}

.nav-btn {
    pointer-events: auto;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border-light);
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.prev-btn {
    margin-right: auto;
}

.next-btn {
    margin-left: auto;
}

.fullsize-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullsize-image img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
}

.image-counter {
    margin-top: 15px;
    color: var(--text-dim);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.favorites-viewer {
    display: flex;
    gap: 20px;
    min-height: 70vh;
}

.favorites-thumbnails-panel {
    width: 180px;
    flex-shrink: 0;
    overflow-y: auto;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 10px;
}

.favorites-thumbnails-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorites-thumbnails-track .thumb {
    width: 100%;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, border-color 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.favorites-thumbnails-track .thumb:hover {
    opacity: 0.8;
}

.favorites-thumbnails-track .thumb.active {
    opacity: 1;
    border-color: var(--text-dim);
}

.eye-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    transition: transform 0.2s;
}

.eye-icon:hover {
    transform: scale(1.2);
}

.eye-icon svg {
    width: 14px;
    height: 14px;
    fill: var(--text-white);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.favorites-fullsize-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 20px;
    position: relative;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.favorites-thumbnails-panel {
    width: 160px;
    flex-shrink: 0;
    overflow-y: auto;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 10px;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.favorites-thumbnails-track {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.favorites-fullsize-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorites-fullsize-image img {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
}

.image-info {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
}

.text-popup {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    border: 1px solid var(--border-light);
    padding: 15px 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    max-width: 80%;
    display: none;
    z-index: 10;
}

.text-popup.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.gallery {
    text-align: center;
}

.slideshow-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.slide {
    display: none;
    animation: fade 0.5s;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: var(--bg-dark);
}

@keyframes fade {
    from {opacity: 0.4}
    to {opacity: 1}
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: var(--text-white);
    font-weight: bold;
    font-size: 20px;
    transition: background 0.3s;
    background: rgba(0,0,0,0.5);
    border: none;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background: rgba(255,255,255,0.2);
}

.controls {
    text-align: center;
    margin: 20px 0;
}

.instruction {
    color: var(--text-dim);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.dots-container {
    text-align: center;
    margin-top: 20px;
}

.dot {
    cursor: pointer;
    height: 8px;
    width: 8px;
    margin: 0 4px;
    background-color: var(--border-light);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.dot:hover,
.dot.active {
    background-color: var(--text-white);
}

.content-page {
    background: var(--bg-darker);
    padding: var(--space-xl);
    border: 1px solid var(--border-color);
}

.content-page h2,
.author-section h2 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: var(--space-lg) 0 var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

.content-page h2:first-child,
.author-section h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-page p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.text-content {
    line-height: 2;
    color: var(--text-muted);
}

.text-content p {
    margin-bottom: var(--space-md);
}

.links-list {
    list-style: none;
}

.links-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.links-list a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.links-list a:hover {
    color: var(--text-white);
}

.contact-info {
    text-align: center;
    padding: 40px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--text-muted);
    text-decoration: none;
}

.contact-info a:hover {
    color: var(--text-white);
}

.theend {
    text-align: center;
    padding: 60px var(--space-md);
}

.theend h2 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.theend p {
    color: var(--text-dim);
    font-size: 1rem;
    letter-spacing: 2px;
}

footer {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--text-white);
}

.author-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.author-section:last-child {
    border-bottom: none;
}

.author-quote {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.7;
    max-width: 800px;
}

.pswp__custom-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 12px var(--space-md);
    font-size: 1.1rem;
    color: var(--text-primary);
    text-align: center;
    max-width: 80%;
    border-radius: 4px;
}

.pswp__button {
    opacity: 1 !important;
}

.pswp__button--arrow--left,
.pswp__button--arrow--right {
    opacity: 0.7 !important;
}

@media (max-width: 768px) {
    .pswp__button--arrow--left,
    .pswp__button--arrow--right {
        width: 44px !important;
        height: 44px !important;
        opacity: 1 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-radius: 50% !important;
    }
    
    .pswp__button--arrow--left::before,
    .pswp__button--arrow--right::before {
        width: 16px !important;
        height: 16px !important;
    }
}

.thumb-wrapper {
    position: relative;
    cursor: pointer;
}

.thumb-wrapper .thumb {
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }

    nav ul {
        gap: 15px;
    }

    nav a {
        font-size: 0.75rem;
    }

    .bio-images {
        flex-direction: column;
    }

    .bio-images img {
        max-width: 100%;
    }

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

    .bio-layout {
        flex-direction: column;
    }

    .bio-portrait {
        text-align: center;
    }

    .bio-portrait img {
        max-width: 100%;
    }

    .exhibitions .year {
        grid-column: 1;
        margin-top: 15px;
    }

    .exhibitions .event {
        grid-column: 1;
    }

    .gallery-viewer,
    .favorites-viewer {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .thumbnails-panel,
    .favorites-thumbnails-panel {
        width: 100%;
        max-height: 200px;
        height: auto;
    }

    .thumbnails-track,
    .favorites-thumbnails-track {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        height: auto;
    }

    .thumbnails-track .thumb,
    .favorites-thumbnails-track .thumb {
        width: 120px;
        flex-shrink: 0;
    }

    .fullsize-panel,
    .favorites-fullsize-panel {
        min-height: 400px;
        height: auto;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

.text-section-title {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: var(--space-xl) 0 var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.text-section-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.text-intro {
    font-style: italic;
    color: #777;
    margin-bottom: 25px;
}

.quote-block {
    margin-bottom: 25px;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--border-light);
}

.quote-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.quote-author {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: right;
}

.contact-info {
    text-align: center;
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-lg);
}

.contact-name {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.contact-address {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.contact-email {
    font-size: 1rem;
    margin-bottom: 15px;
}

.contact-email a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-email a:hover {
    color: var(--text-white);
}

.contact-fax {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.contact-quote {
    margin: 0;
}

.credits-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.credit-item {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.credit-item:last-of-type {
    border-bottom: none;
}

.credit-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    flex-shrink: 0;
}

.credit-text {
    flex: 1;
}

.credit-text h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.credit-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.credit-link a {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-decoration: none;
}

.credit-link a:hover {
    color: var(--text-white);
}

.end-image {
    position: relative;
    margin: var(--space-xl) 0;
    overflow: hidden;
}

.end-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.end-poem {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

@media (max-width: 600px) {
    .end-image {
        min-height: 400px;
    }
    
    .end-image img {
        height: 400px;
    }
    
    .end-poem {
        padding: var(--space-md);
        position: relative;
        background: rgba(0, 0, 0, 0.9);
    }
}

.end-poem p {
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: var(--space-xs);
}

.poem-author {
    margin-top: var(--space-sm) !important;
    color: var(--text-muted) !important;
}

.end-thanks {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: var(--space-xl);
    letter-spacing: 2px;
}

.end-copyright {
    text-align: center;
    font-size: 0.9rem;
    color: var(--border-light);
    margin-top: 10px;
}

.page-wide {
    max-width: 900px;
}

.contact-portrait {
    text-align: center;
    margin-bottom: 30px;
}

.contact-portrait img {
    max-width: 300px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.contact-info {
    padding: 0;
    text-align: left;
}

.contact-info p {
    margin-bottom: 12px;
}

.contact-links {
    margin-top: var(--space-lg);
}

.contact-links h3 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.contact-links p {
    margin-bottom: var(--space-xs);
}

.contact-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-links a:hover {
    color: var(--text-white);
}

.admin {
    color: var(--text-muted);
    cursor: default;
}

.admin:hover {
    color: var(--text-muted);
}