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

/* Screen reader only class - visually hidden but accessible to screen readers */
.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;
}

/* Skip to content link - visually hidden until focused */
.skip-link {
    position: absolute;
    top: -50px; /* Hide off-screen by default */
    left: 0;
    padding: 12px 20px;
    background-color: #000000; /* High contrast black background */
    color: #ffffff; /* Pure white text for maximum contrast */
    font-weight: 700; /* Bold text for better visibility */
    font-size: 1.1rem; /* Slightly larger text */
    text-decoration: none;
    z-index: 9999; /* Ensure it's always on top */
    transition: top 0.3s ease;
    border-radius: 0 0 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
    top: 0; /* Become visible when focused */
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    border: 2px solid #ffffff; /* White border only when focused */
}

/* Custom properties */
:root {
    /* Base colors */
    --text-primary: #1a1a1a;
    --text-light: #f0f0f0;
    --bg-primary: #f8f8f8;
    --card-bg: #ffffff;
    
    /* Primary accent - Copper (Autumn) */
    --accent-color: #b87333; /* Deep copper - autumn accent */
    --accent-light: #d9a97a; /* Lighter copper for backgrounds */
    --accent-light-accessible: #f0c595; /* Brighter copper that meets WCAG AA contrast requirements */
    --accent-dark: #8e5826; /* Darker copper for hover states */
    
    /* Secondary accent - Forest Green */
    --secondary-color: #2e5339; /* Deep forest green */
    --secondary-light: #3e6c4a; /* Lighter green for highlights */
    --secondary-dark: #1e3523; /* Darker green for text */
    
    /* Utility colors */
    --link-color: #0066cc;
    --link-hover: var(--accent-color);
    --card-shadow: 0 2px 5px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --photo-shadow: 0 3px 10px rgba(0,0,0,0.15);
    
    /* Focus styles for accessibility */
    --focus-outline-color: #ff9900; /* High contrast orange for focus indicators */
    --focus-outline-weight: 3px; /* Thick enough to be visible */
    --focus-outline-offset: 2px; /* Space between element and focus ring */
    
    /* Background overlay with 40% white overlay - 60% visibility for background */
    --bg-overlay-mobile: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4));
    --bg-overlay-desktop: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4));
}

/* Base styles */
html {
    font-size: 16px;
    line-height: 1.5;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    padding: 1rem;
    min-height: 100%;
    position: relative;
    /* Add a default background color in case the background image fails */
    background-color: var(--bg-primary);
}

/* Background styles */
.bg-mist {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: url('../images/bg-burning-tree.webp');
    background-color: var(--bg-primary); /* Fallback color */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Add overlay as a separate element for better browser compatibility */
/* Overlay temporarily commented out to see sharp background image */
/* .bg-mist::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--bg-overlay-mobile);
} */

/* Fallback for browsers that don't support WebP */
.no-webp .bg-mist {
    background-image: url('../images/bg-burning-tree.jpg');
}

/* Typography */
h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    color: var(--accent-light);
    font-weight: 600;
}

/* Layout */
header, main, footer {
    max-width: 37.5rem; /* Changed from 600px for better accessibility */
    width: 90%; /* Added for responsive scaling */
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Profile Photo */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-photo {
    width: 9.375rem; /* Changed from 150px */
    height: 9.375rem; /* Changed from 150px */
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--photo-shadow);
    position: relative;
    border: 0.1875rem solid var(--accent-color); /* Changed from 3px */
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-text {
    text-align: center;
}

.subtitle {
    color: var(--accent-light);
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    font-weight: 500;
    margin-top: 0.3rem;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.bio-brief {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    max-width: 25rem; /* Changed from 400px */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-weight: 400;
}

/* Sections */
section {
    margin: 2rem 0;
    text-align: center;
}

section h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
    color: var(--accent-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    display: inline-block;
    font-weight: 600;
}

/* Overlay Box - For legibility over dark backgrounds */
.overlay-box {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 1.5rem;
    border-radius: 12px;
    color: var(--text-light);
}

/* Bio */
.bio {
    text-align: center;
    max-width: 31.25rem; /* Changed from 500px */
    width: 90%; /* Added for responsive scaling */
    margin: 2rem auto;
    background-color: rgba(0, 0, 0, 0.75); /* Overlay for legibility */
    padding: 1.5rem;
    border-radius: 0.75rem; /* Changed from 12px */
    color: var(--text-light);
    box-shadow: var(--card-shadow);
}

.bio p {
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.teaser {
    font-style: italic;
    margin: 0.5rem 0 0 0;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.5;
    border-left: 3px solid var(--accent-color);
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

/* Accessible focus styles for keyboard navigation */
/* Apply focus styles only when keyboard is used, not on mouse click */
a:focus-visible {
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    color: var(--link-hover);
    text-decoration: underline;
}

/* For browsers that don't support :focus-visible */
a:focus:not(:focus-visible) {
    outline: none;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Changed from 12px */
    max-width: 31.25rem; /* Changed from 500px */
    width: 90%; /* Added for responsive scaling */
    margin: 0 auto;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 0.9375rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.75); /* Dark background to match other containers */
    color: var(--text-light); /* Light text for dark background */
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3); /* Enhanced shadow for depth */
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 0.1875rem solid rgba(240, 197, 149, 0.7); /* Lighter copper border (using accent-light-accessible) */
}

.link-card:nth-child(even) {
    border-left: 0.1875rem solid rgba(102, 204, 153, 0.7); /* Lighter green border for alternating cards */
}

.link-card i {
    margin-right: 0.9375rem;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.2rem;
    text-align: center;
    transition: transform 0.2s ease;
    /* Icon colors remain the same for brand recognition */
}

.publisher-icon {
    margin-right: 0.9375rem;
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    transition: transform 0.2s ease;
    filter: brightness(1.2); /* Slightly brighten icons for better visibility */
}

/* Special styling for the publisher icon (black logo on transparent background) */
.link-card[data-platform="publisher"] .publisher-icon {
    background-color: white; /* White circular background */
    border-radius: 50%; /* Make it circular */
    padding: 0.1875rem; /* Add some padding to not crowd the logo */
    box-sizing: content-box; /* Ensure the width/height don't include padding */
}

/* Add text styling for link text */
.link-card span {
    flex: 1;
    text-align: left;
    font-weight: 500;
    color: var(--text-light); /* Light text for dark background */
}

/* Platform-specific icon colors - brightened for dark background */
.link-card[data-platform="instagram"] i {
    color: #FF6CA7; /* Brightened from #E1306C */
}

.link-card[data-platform="threads"] i {
    color: #FFFFFF; /* Changed from black for visibility on dark background */
}

.link-card[data-platform="goodreads"] i {
    color: #DEB887; /* Brightened from #553B08 */
}

.link-card[data-platform="bluesky"] i {
    color: #5AC8FF; /* Brightened from #1DA1F2 */
}

.link-card[data-platform="linkedin"] i {
    color: #0A9DEC; /* Brightened from #0077B5 */
}

.link-card[data-platform="main-website"] i {
    color: var(--accent-light-accessible); /* Using the accessible copper */
}

.link-card[data-platform="publisher"] i {
    color: #66CC99; /* Brightened from --secondary-color */
}

/* Commented out platforms */
.link-card[data-platform="patreon"] i {
    color: #FFA4A4; /* Brightened from #F96854 */
}

.link-card[data-platform="youtube"] i {
    color: #FF5555; /* Brightened from #FF0000 */
}

/* Alternating card styling with secondary color */
/* Hover styles */
.link-card:nth-child(even):hover {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.4);
    text-decoration: none;
    border-left: 0.25rem solid rgba(102, 204, 153, 0.9); /* Brighter green on hover */
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.85); /* Darker background on hover */
}

.link-card:nth-child(even):hover span {
    color: var(--accent-light-accessible); /* Brighter text for better visibility */
}

.link-card:nth-child(odd):hover {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.4);
    text-decoration: none;
    border-left: 0.25rem solid rgba(240, 197, 149, 0.9); /* Brighter copper on hover */
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.85); /* Darker background on hover */
}

.link-card:nth-child(odd):hover span {
    color: var(--accent-light-accessible); /* Brighter text for better visibility */
}

/* Enhance icon appearance on hover */
.link-card:hover i,
.link-card:hover .publisher-icon {
    transform: scale(1.1);
    filter: brightness(1.3); /* Brighten icons on hover */
}

/* Special hover effect for publisher icon */
.link-card[data-platform="publisher"]:hover .publisher-icon {
    transform: scale(1.1);
    box-shadow: 0 0 0.3125rem rgba(255, 255, 255, 0.5); /* Add subtle glow */
}

/* Keyboard focus styles for link cards - high visibility for accessibility */
.link-card:focus-visible {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.4);
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    border-left: 0.25rem solid var(--focus-outline-color);
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.9); /* Even darker background for focus */
}

.link-card:focus-visible span {
    text-decoration: underline;
    font-weight: 600;
    color: #ffffff; /* Pure white text for maximum contrast on focus */
}

.link-card:focus-visible i,
.link-card:focus-visible .publisher-icon {
    transform: scale(1.1);
    filter: brightness(1.5); /* Even brighter icons on focus */
}

/* Special focus effect for publisher icon */
.link-card[data-platform="publisher"]:focus-visible .publisher-icon {
    transform: scale(1.1);
    box-shadow: 0 0 0.5rem rgba(255, 255, 255, 0.8); /* Brighter glow on focus */
}

/* For browsers that don't support :focus-visible */
.link-card:focus:not(:focus-visible) {
    outline: none;
}

/* Projects */
.projects {
    margin-top: 3rem;
}

.project-card {
    background-color: rgba(0, 0, 0, 0.75); /* Overlay for legibility */
    padding: 2rem;
    border-radius: 0.75rem; /* Changed from 12px */
    color: var(--text-light);
    box-shadow: var(--card-shadow);
    margin-bottom: 1rem;
    max-width: 31.25rem; /* Changed from 500px */
    width: 90%; /* Added for responsive scaling */
    margin-left: auto;
    margin-right: auto;
    border-top: 0.1875rem solid var(--accent-color); /* Changed from 3px */
    border-bottom: 0.1875rem solid var(--secondary-color); /* Changed from 3px */
}

.project-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--accent-light-accessible);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 600;
}

.project-card strong {
    color: var(--accent-light-accessible);
    font-weight: 600;
}

.project-card p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Secondary accent for specific terms */
.project-card p em {
    color: var(--secondary-light);
    font-style: normal;
    font-weight: 500;
}

/* Footer */
footer {
    margin-top: 2rem;
    padding: 1.5rem;
    text-align: center;
    font-size: 1rem; /* Increased from 0.875rem for better readability (WCAG AA) */
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color: var(--text-light);
}

footer a {
    color: var(--accent-light-accessible);
    font-weight: 500;
}

footer a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

footer a:focus-visible {
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    color: var(--text-light);
    text-decoration: underline;
}

footer .credits {
    margin-top: 0.75rem;
    font-size: 0.9rem; /* Increased from 0.75rem to 0.9rem for better legibility (WCAG AA) */
    color: #d0d0d0;
}

footer .credits a {
    color: var(--accent-light-accessible);
    font-weight: 500;
}

footer .credits a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

footer .credits a:focus-visible {
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    color: var(--text-light);
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 1.25rem; /* Changed from 20px */
    box-sizing: border-box;
}

.modal[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem; /* Changed from 8px */
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 37.5rem; /* Changed from 600px */
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    margin: 0 auto;
}

.modal-header {
    padding: 0.9375rem 1.25rem; /* Changed from 15px 20px */
    border-bottom: 0.0625rem solid #eee; /* Changed from 1px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
    text-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.5); /* Changed from 0 1px 3px */
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    padding: 0;
    width: 1.875rem; /* Changed from 30px */
    height: 1.875rem; /* Changed from 30px */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-button:hover {
    color: var(--accent-color);
    background-color: rgba(0, 0, 0, 0.05);
}

.close-button:focus-visible {
    color: var(--accent-color);
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    background-color: rgba(0, 0, 0, 0.1);
}

/* For browsers that don't support :focus-visible */
.close-button:focus:not(:focus-visible) {
    outline: none;
}

.modal-body {
    padding: 1.25rem; /* Changed from 20px */
    background-color: rgba(0, 0, 0, 0.75); /* Overlay for legibility */
    color: var(--text-light);
    border-radius: 0 0 0.75rem 0.75rem; /* Changed from 0 0 12px 12px */
}

.modal-body h3 {
    color: var(--accent-light-accessible);
    margin-top: 1.25rem; /* Changed from 20px */
    margin-bottom: 0.625rem; /* Changed from 10px */
    font-size: 1.2rem;
    text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.9); /* Changed from 0 2px 4px */
    font-weight: 600;
}

.modal-body p, .modal-body ul {
    margin-bottom: 1.125rem; /* Changed from 18px */
    line-height: 1.6;
}

.modal-body ul {
    padding-left: 1.25rem; /* Changed from 20px */
}

.modal-body ul li {
    margin-bottom: 0.5rem; /* Changed from 8px */
}

/* Accessible link styles for modal content */
.modal-body a {
    color: var(--accent-light-accessible); /* Higher contrast color for dark backgrounds */
    font-weight: 500;
    text-decoration: underline; /* Underlined by default for better visibility */
}

.modal-body a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

.modal-body a:focus-visible {
    outline: var(--focus-outline-weight) solid var(--focus-outline-color);
    outline-offset: var(--focus-outline-offset);
    color: var(--text-light);
    text-decoration: underline;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    .overlay-box {
        background-color: rgba(0, 0, 0, 0.85);
    }
    
    .bio {
        background-color: rgba(0, 0, 0, 0.85);
        padding: 1.75rem;
        margin: 1.5rem auto;
    }
    
    .project-card {
        background-color: rgba(0, 0, 0, 0.85);
        padding: 1.75rem;
    }
    
    .modal-body {
        background-color: rgba(0, 0, 0, 0.85);
        padding: 1.75rem;
    }
    
    /* Ensure modal links are visible on mobile too */
    .modal-body a {
        color: var(--accent-light-accessible);
        font-weight: 600; /* Slightly bolder on mobile for better readability */
    }
    
    .teaser {
        font-size: 1rem;
    }
    
    body {
        line-height: 1.6;
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 1.85rem;
    }
    
    .subtitle {
        font-size: 1rem;
        color: var(--text-light);
    }
    
    section h2 {
        font-size: 1.4rem;
        margin-bottom: 0.85rem;
        padding: 0.75rem 1.25rem;
    }
    
    .link-card {
        padding: 0.75rem 0.9375rem; /* Converted from 12px 15px to rem units */
        /* Improved touch target size for accessibility */
        min-height: 3rem;
    }
    
    /* Enhance text shadow on small screens for better readability */
    h1, h2, h3, .subtitle {
        text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 1);
    }
    
    /* Adjust spacing for better mobile experience */
    section {
        margin: 1.5rem 0;
    }
    
    header {
        background-color: rgba(0, 0, 0, 0.85);
        margin-bottom: 1.5rem;
        padding: 1.25rem;
    }
    
    footer {
        margin-top: 1.5rem;
        padding: 1.25rem;
        background-color: rgba(0, 0, 0, 0.85);
    }
    
    .project-card h3 {
        color: var(--text-light);
    }
    
    .project-card strong {
        color: var(--text-light);
    }
    
    /* Improved focus states for touch devices */
    a:focus-visible,
    .link-card:focus-visible,
    .close-button:focus-visible {
        outline-width: 0.25rem; /* Increased for better visibility on mobile */
    }
    
    /* Better spacing for modal on mobile */
    .modal-content {
        max-height: 85vh; /* Better fit for mobile screens */
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }
    
    .profile-photo {
        width: 8rem;
        height: 8rem;
    }
    
    .link-card {
        padding: 0.9375rem 0.75rem;
    }
    
    .link-card i,
    .publisher-icon {
        margin-right: 0.75rem;
    }
    
    .bio-brief {
        max-width: 100%; /* Full width on very small screens */
    }
    
    /* Improved touch target sizes for very small screens */
    footer a {
        padding: 0.5rem;
        display: inline-block;
    }
    
    /* Adjust modal for very small screens */
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body h3 {
        font-size: 1.1rem;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .profile-container {
        flex-direction: row;
        gap: 1rem;
    }
    
    .profile-photo {
        width: 6.25rem;
        height: 6.25rem;
    }
    
    .bio-brief {
        font-size: 0.9rem;
        max-width: 25rem;
    }
    
    /* Better layout for landscape mode */
    .links-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }
    
    /* Adjust modal for landscape */
    .modal-content {
        max-height: 80vh;
        max-width: 90%;
    }
}

/* Desktop Media Queries */
@media (min-width: 768px) {
    body {
        padding: 2rem;
    }
    
    /* Enhanced background effect for desktop */
    .bg-mist {
        background-image: url('../images/bg-burning-tree.webp');
        background-attachment: fixed;
    }
    
    /* Desktop overlay adjustment - temporarily commented out */
    /* .bg-mist::before {
        background: var(--bg-overlay-desktop);
    } */
    
    /* Fallback for desktop browsers that don't support WebP */
    .no-webp .bg-mist {
        background-image: url('../images/bg-burning-tree.jpg');
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .profile-container {
        flex-direction: row;
        justify-content: center;
        text-align: left;
        gap: 1.5rem;
    }
    
    .profile-text {
        text-align: left;
    }
    
    .subtitle {
        text-align: left;
        font-size: 1.2rem;
        color: var(--text-light);
    }
    
    .bio-brief {
        text-align: left;
        font-size: 1rem;
        max-width: 21.875rem;
    }
    
    .profile-photo {
        width: 11.25rem;
        height: 11.25rem;
    }
    
    header {
        padding: 1.5rem 2rem;
        background-color: rgba(0, 0, 0, 0.75);
    }
    
    footer {
        padding: 1.5rem;
    }
    
    .project-card h3 {
        color: var(--text-light);
    }
    
    .project-card strong {
        color: var(--text-light);
    }
    
    section h2 {
        padding: 0.75rem 2rem;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .links-container {
        max-width: 85%;
    }
    
    .profile-photo {
        width: 10rem;
        height: 10rem;
    }
    
    body {
        padding: 1.5rem;
    }
    
    /* Adjust container widths for tablets */
    header, main, footer,
    .bio, .project-card {
        max-width: 90%;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .links-container,
    .bio,
    .project-card {
        max-width: 40rem;
    }
    
    header, main, footer {
        max-width: 50rem;
    }
    
    /* Slightly larger profile photo on large screens */
    .profile-photo {
        width: 12.5rem;
        height: 12.5rem;
    }
    
    /* More generous padding on large screens */
    body {
        padding: 3rem;
    }
}

/* Enhanced touch interactions */
@media (hover: none) and (pointer: coarse) {
    /* Styles for touch devices */
    .link-card {
        min-height: 3rem; /* Ensure minimum touch target size */
    }
    
    /* Larger focus indicators for touch */
    a:focus-visible,
    .link-card:focus-visible {
        outline-width: 0.25rem;
    }
    
    /* Better tap target for footer links */
    footer a {
        padding: 0.5rem;
        display: inline-block;
        margin: 0 0.25rem;
    }
}

/* Print styles - hide background for printing */
@media print {
    .bg-mist {
        display: none;
    }
}