/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* CSS Custom Properties - Light Mode (Default) */
:root {
    --bg-body: #f5f5f5;
    --bg-container: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-tertiary: #666666;
    --heading-color: #1a1a1a;
    --link-color: #0050a0;
    --link-hover: #0056b3;
    --border-color: #e0e0e0;
    --shadow: rgb(0 0 0 / 10%);
    --shadow-headshot: rgb(0 0 0 / 10%);
}

/* Dark Mode - Manual Override */
[data-theme='dark'] {
    --bg-body: #1a1a1a;
    --bg-container: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #999999;
    --heading-color: #ffffff;
    --link-color: #5dade2;
    --link-hover: #7dbef5;
    --border-color: #444444;
    --shadow: rgb(0 0 0 / 30%);
    --shadow-headshot: rgb(0 0 0 / 40%);
}

/* Dark Mode - System Preference Fallback */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-body: #1a1a1a;
        --bg-container: #2d2d2d;
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
        --text-tertiary: #999999;
        --heading-color: #ffffff;
        --link-color: #5dade2;
        --link-hover: #7dbef5;
        --border-color: #444444;
        --shadow: rgb(0 0 0 / 30%);
        --shadow-headshot: rgb(0 0 0 / 40%);
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

/* Base link styles - WCAG AA compliant */
a,
a:link,
a:visited {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

/* Main container */
.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 30px;
    background-color: var(--bg-container);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Typography */
h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

/* Page Last Updated */
.page-updated {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

/* Headshot */
.headshot {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px var(--shadow-headshot);
    transition: box-shadow 0.3s ease;
    object-fit: cover;
}

.bio {
    margin-bottom: 2rem;
    padding: 1.5rem;
    font-size: 1rem;
    text-align: left;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.bio ul {
    margin: 0.5rem 0;
    padding-left: 0;
    list-style-position: inside;
}

.bio li {
    margin-bottom: 0.25rem;
}

.bio p {
    margin-bottom: 1rem;
}

.bio a {
    text-decoration: underline;
    color: var(--link-color);
}

.bio a:hover,
.bio a:focus {
    color: var(--link-hover);
}

/* Screen reader only (accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    border-width: 0;
    clip-path: inset(50%);
}

/* Social links section */
.social-links {
    margin-top: 2.5rem;
    padding: 0.75rem;
}

.social-links h2 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: left;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

.social-links h2:first-child {
    margin-top: 0;
}

.social-links h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.social-note {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-style: italic;
    text-align: left;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.social-links ul {
    margin: 0.5rem 0 1.5rem;
    padding-left: 0;
    list-style-position: inside;
}

.social-links li {
    margin-bottom: 0.5rem;
}

.social-links a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
}

.social-links a:hover,
.social-links a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

.social-links a:focus {
    border-radius: 2px;
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Footer */
footer {
    flex-shrink: 0;
    width: 100%;
    max-width: 600px;
    margin-top: 3rem;
    margin-right: auto;
    margin-left: auto;
    padding: 1.5rem 0.75rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-color);
    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}

.footer-contact {
    margin-bottom: 1.5rem;
}

.footer-contact h2 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.footer-contact ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-contact li {
    margin: 0;
}

.footer-contact a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
}

.footer-contact a:hover,
.footer-contact a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

.footer-contact a:focus {
    border-radius: 2px;
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

.footer-nav {
    margin-bottom: 1.5rem;
}

.footer-nav h2 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-nav li {
    margin: 0;
}

.footer-nav a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

.footer-nav a:focus {
    border-radius: 2px;
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

footer p {
    margin: 0.4rem 0;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    background-color: var(--bg-container);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--bg-container);
    background-color: var(--text-primary);
    transform: scale(1.1);
}

.theme-toggle:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle-icon {
    display: block;
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.3s ease;
}

.theme-toggle-text {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.theme-toggle[aria-pressed='true'] .theme-toggle-icon {
    transform: rotate(180deg);
}

/* Navigation */
.main-nav {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background-color: var(--bg-container);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus {
    text-decoration: none;
    color: var(--link-color);
    background-color: var(--bg-body);
}

.main-nav a.active {
    font-weight: 600;
    color: #ffffff;
    background-color: var(--link-color);
}

.main-nav a.active:hover,
.main-nav a.active:focus {
    color: #ffffff;
    background-color: var(--link-hover);
}

.main-nav a:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Home icon in navigation */
.main-nav .home-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    border-radius: 50%;
    transition: opacity 0.2s ease;
    object-fit: cover;
    vertical-align: middle;
}

.main-nav a:hover .home-icon,
.main-nav a:focus .home-icon {
    opacity: 0.9;
}

.main-nav a.active .home-icon {
    opacity: 1;
}

/* Nav Search Form */
.nav-search {
    display: flex;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.nav-search-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.nav-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.nav-search-input:focus {
    border-color: var(--link-color);
    outline: none;
    box-shadow: 0 0 0 2px rgb(0 80 160 / 10%);
}

.nav-search-input::placeholder {
    color: var(--text-tertiary);
}

.nav-search-button {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    color: #ffffff;
    background-color: var(--link-color);
    border: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.nav-search-button:hover,
.nav-search-button:focus {
    background-color: var(--link-hover);
}

.nav-search-button:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.breadcrumb a {
    text-decoration: none;
    color: var(--link-color);
}

.breadcrumb a:hover,
.breadcrumb a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

.breadcrumb span {
    color: var(--text-secondary);
}

/* Page Links Section (Homepage) */
.page-links {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.page-links h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

.page-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-links li {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.page-links li:last-child {
    margin-bottom: 0;
}

.page-links a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
}

.page-links a:hover,
.page-links a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

.page-links a:focus {
    border-radius: 2px;
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

.page-links strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Content section */
.content {
    margin-top: 1.5rem;
}

.content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content h2:first-of-type {
    margin-top: 0;
}

.content h2 + p {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content h2 + h3 {
    margin-top: 1rem;
}

.content p {
    margin-bottom: 1.5rem;
}

.content ul {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.intro {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* Education Links */
.education-links {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.education-links li {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.education-links li:last-child {
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

.education-links a {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--link-color);
}

.education-links a:hover,
.education-links a:focus {
    text-decoration: underline;
    color: var(--link-hover);
}

.education-links .blurb {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Work Experience */
.work-experience {
    margin-top: 1.5rem;
}

.work-entry {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.work-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.work-logo-container {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.work-logo {
    width: 48px;
    height: 48px;
    padding: 2px;
    background-color: var(--bg-body);
    border-radius: 4px;
    transition: opacity 0.2s ease;
    object-fit: contain;
}

.work-logo:hover {
    opacity: 0.9;
}

.work-content {
    flex: 1;
    min-width: 0;
}

.work-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

.work-company {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.work-meta {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.work-location {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.work-description {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Responsive adjustments - Mobile-first approach */
@media (width >= 481px) {
    .container {
        padding: 40px 30px;
    }

    .social-links {
        padding: 1rem;
    }

    .social-links h2 {
        font-size: 1.5rem;
    }

    .social-links h3 {
        font-size: 1.125rem;
    }

    footer {
        padding: 2rem 1rem;
        font-size: 0.9rem;
    }

    .footer-contact ul {
        gap: 1rem;
    }

    .footer-contact h2 {
        font-size: 1rem;
    }

    footer p {
        margin: 0.5rem 0;
    }

    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .main-nav {
        padding: 1.25rem;
    }

    .main-nav a {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
    }

    .page-links {
        padding: 2rem;
    }

    .page-links h2 {
        font-size: 1.75rem;
    }
}

@media (width >= 769px) {
    .container {
        padding: 60px 40px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .bio {
        margin-bottom: 2.5rem;
        font-size: 1.125rem;
    }

    .headshot {
        width: 150px;
        height: 150px;
    }

    .social-links {
        padding: 1.5rem;
    }

    .social-links h2 {
        font-size: 1.75rem;
    }

    .social-links h3 {
        font-size: 1.25rem;
    }

    .main-nav {
        padding: 1.5rem;
    }

    .main-nav a {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .page-links {
        padding: 2.5rem;
    }

    .breadcrumb {
        font-size: 0.95rem;
    }

    .content h2 {
        margin-top: 3rem;
    }

    .content h2 + p {
        margin-bottom: 2rem;
    }

    .work-entry {
        gap: 1.5rem;
    }

    .work-title {
        font-size: 1.125rem;
    }

    .work-company,
    .work-meta,
    .work-location {
        font-size: 0.95rem;
    }

    .work-description {
        font-size: 0.95rem;
    }
}

/* Video Intro Section */
.video-intro {
    margin: 1rem 0 1.5rem;
    padding: 0.75rem;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.video-intro h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: #000000;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

@media (width >= 481px) {
    .video-intro {
        padding: 1rem;
    }

    .video-intro h2 {
        font-size: 1.5rem;
    }
}

@media (width >= 769px) {
    .video-intro {
        padding: 1.25rem;
    }
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Portrait Gallery - optimized for vertical photos */
.photo-gallery-portrait {
    grid-template-columns: 1fr;
}

.photo-item {
    position: relative;
    width: 100%;
    overflow: visible;
    background-color: var(--bg-body);
    border-radius: 8px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.photo-portrait {
    max-width: 400px;
    margin: 0 auto;
}

.photo-portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
}

/* Landscape Gallery - optimized for horizontal photos */
.photo-gallery-landscape {
    grid-template-columns: 1fr;
}

.photo-landscape {
    width: 100%;
}

.photo-landscape img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.photo-item a {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    min-height: 44px;
    text-decoration: none;
    outline: none;
    cursor: pointer;
}

.photo-item img {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    transition:
        transform 0.3s ease,
        opacity 0.2s ease;
}

/* Tooltip for photo links */
.photo-link[data-tooltip] {
    position: relative;
}

.photo-link[data-tooltip]::after {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 1000;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    color: #ffffff;
    background-color: rgb(0 0 0 / 90%);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
    transform: translateX(-50%);
    pointer-events: none;
    content: attr(data-tooltip);
}

.photo-link[data-tooltip]::before {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    z-index: 1001;
    border: 5px solid transparent;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    transform: translateX(-50%);
    pointer-events: none;
    content: '';
    border-top-color: rgb(0 0 0 / 90%);
}

.photo-link[data-tooltip]:hover::after,
.photo-link[data-tooltip]:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.photo-link[data-tooltip]:hover::before,
.photo-link[data-tooltip]:focus::before {
    opacity: 1;
    visibility: visible;
}

.photo-item:hover img,
.photo-item a:focus img {
    opacity: 0.9;
    transform: scale(1.02);
}

.photo-item a:focus {
    border-radius: 8px;
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Responsive gallery adjustments */
@media (width >= 481px) {
    .photo-gallery-portrait {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .photo-portrait {
        max-width: none;
        margin: 0;
    }

    .photo-gallery-landscape {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (width >= 769px) {
    .photo-gallery-portrait {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .photo-gallery-landscape {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: rgb(0 0 0 / 90%);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 95vw;
    height: 100%;
    max-height: 95vh;
}

.lightbox-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 95vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgb(0 0 0 / 50%);
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: #333333;
    background-color: rgb(255 255 255 / 90%);
    border: none;
    border-radius: 50%;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    background-color: #ffffff;
    outline: 2px solid #ffffff;
    transform: scale(1.1);
    outline-offset: 2px;
}

.lightbox-close:active {
    transform: scale(0.95);
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: fixed;
    top: 50%;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: #333333;
    background-color: rgb(255 255 255 / 90%);
    border: none;
    border-radius: 50%;
    opacity: 0.9;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
    transform: translateY(-50%);
    cursor: pointer;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover,
.lightbox-nav:focus {
    background-color: #ffffff;
    outline: 2px solid #ffffff;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    outline-offset: 2px;
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

@media (width <= 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (width <= 768px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.75rem;
        background-color: rgb(255 255 255 / 90%);
    }

    .lightbox-container {
        max-width: 100vw;
        max-height: 100vh;
    }

    .lightbox-image {
        max-height: 100vh;
    }
}

/* Wide screen - show text in toggle button */
@media (width >= 1024px) {
    .theme-toggle {
        width: auto;
        min-width: 44px;
        height: auto;
        min-height: 44px;
        padding: 0.625rem 1rem;
        border-radius: 24px;
    }

    .theme-toggle-text {
        display: block;
    }
}
