/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

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

/* Performance optimizations */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce motion for users who prefer it */
@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;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background: #fff;
    color: #000;
    overflow: hidden;
    height: 100vh;
    max-height: 100vh;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide default cursor on all elements */
* {
    cursor: none !important;
}

a, button, input, textarea, select, .project-image-container, .nav-brand, .project-more, img {
    cursor: none !important;
}

/* Accessibility: Focus States for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.project-more:focus-visible,
.nav-brand:focus-visible {
    outline: 2px solid #000;
    outline-offset: 4px;
}

/* Focus state for interactive elements on touch devices */
@media (hover: none) and (pointer: coarse) {
    a:focus,
    button:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 2px solid #000;
        outline-offset: 4px;
    }
}

/* Skip to main content link for screen readers */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #000;
    color: #fff;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 1em;
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10002;
    transition: all 0.1s ease;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.05);
    border-color: #000;
}

.cursor-follower {
    width: 20px;
    height: 20px;
    position: fixed;
    pointer-events: none;
    z-index: 10003;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 500;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

.cursor-follower::before {
    content: '+';
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }

    body, * {
        cursor: auto !important;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInScale 0.8s ease-out;
}

/* Pulsing Circle Loader (matches cursor design) */
.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 2px solid #000;
    border-radius: 50%;
    position: relative;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-spinner::before {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 500;
    color: #000;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem;
    z-index: 9000;
    animation: fadeIn 0.8s ease-out;
}

.nav-brand {
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    will-change: transform;
}

.nav-brand:hover {
    opacity: 0.6;
}

/* Social Icons */
.nav-socials {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-socials a {
    color: #000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

.nav-socials a:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

.nav-socials a:active {
    transform: translateY(0);
}

.nav-socials svg {
    width: 24px;
    height: 24px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 9001;
    transition: all 0.3s ease;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #000;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-socials {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.4s ease;
        z-index: 9000;
    }

    .nav-socials.active {
        right: 0;
    }

    .nav-socials a svg {
        width: 40px;
        height: 40px;
    }
}

/* Hero Section */
.hero {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    padding: 6rem 2.5rem 0 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-image {
    transition: transform 0.3s ease;
    will-change: transform;
}

.hero-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

.hero-content {
    transition: transform 0.3s ease;
    will-change: transform;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 95px;
    font-weight: 700;
    letter-spacing: -4px;
    line-height: 0.95;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 100;
    line-height: 1.6;
}

/* Projects - Fixed at bottom with 50px from bottom */
.projects-wrapper {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    overflow-x: auto;
    overflow-y: hidden;
    animation: slideInLeft 1s ease-out 0.4s both;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.projects-wrapper::-webkit-scrollbar {
    display: none;
}

/* Mobile-specific improvements for project scrolling */
@media (max-width: 768px) {
    .projects-wrapper {
        bottom: 30px;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 1.5rem;
        position: relative;
    }
    
    /* Add scroll indicator for mobile */
    .projects-wrapper::after {
        content: '';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: linear-gradient(90deg, transparent, rgba(0,0,0,0.3), transparent);
        border-radius: 2px;
        animation: scrollHint 2s ease-in-out infinite;
        pointer-events: none;
    }
    
    @keyframes scrollHint {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 0.7; }
    }
    
    .project-card {
        scroll-snap-align: start;
        scroll-snap-stop: normal;
    }
    
    /* Improve touch targets on mobile */
    .nav-socials a {
        padding: 0.5rem;
        margin: -0.5rem;
    }
    
    .hamburger {
        padding: 0.5rem;
        margin: -0.5rem;
    }
}

.projects-container {
    display: flex;
    gap: 1.5rem;
    padding: 0 2.5rem;
}

/* Add spacing after the last project */
.projects-container::after {
    content: '';
    display: block;
    min-width: 25px;
    height: 1px;
}

.project-card {
    flex-shrink: 0;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.project-card:nth-child(1) { animation-delay: 0.5s; }
.project-card:nth-child(2) { animation-delay: 0.6s; }
.project-card:nth-child(3) { animation-delay: 0.7s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }
.project-card:nth-child(5) { animation-delay: 0.9s; }
.project-card:nth-child(6) { animation-delay: 1s; }
.project-card:nth-child(7) { animation-delay: 1.1s; }
.project-card:nth-child(8) { animation-delay: 1.2s; }

.project-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 16px;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.project-separator {
    color: #000;
}

.project-more {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.project-more::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #000;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.project-more:hover {
    opacity: 0.6;
}

.project-more:hover::after {
    transform: scaleX(0);
    transform-origin: right;
}

.project-image-container {
    position: relative;
    width: 490px;
    height: 490px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.4s ease;
}

.project-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.3s ease;
    will-change: transform;
}

.project-image-container:hover .project-image {
    transform: scale(1.05);
}

/* Project Info Overlay */
.project-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-info-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out forwards;
}

.project-info-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2rem;
}

.project-info-title {
    font-size: 20px;
    font-weight: 400;
}

.project-info-year {
    font-size: 20px;
    font-weight: 400;
}

.project-info-description {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    flex: 1;
}

.project-info-description p {
    margin-bottom: 1.5rem;
}

.project-info-description p:last-child {
    margin-bottom: 0;
}

.project-info-footer {
    font-size: 13px;
    font-weight: 400;
}

/* About Overlay - Improved Design */
.about-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.about-overlay.active {
    transform: translateY(0);
}

/* Close Button */
.about-close {
    position: fixed;
    top: 2.5rem;
    right: 2.5rem;
    background: transparent;
    border: none;
    padding: 0.5rem;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.about-overlay.active .about-close {
    opacity: 1;
    transition-delay: 0.3s;
}

.about-close:hover {
    opacity: 0.6;
    transform: rotate(90deg);
}

.about-close svg {
    display: block;
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 7rem 2.5rem 4rem;
}

/* About Hero Section */
.about-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: start;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.about-overlay.active .about-hero {
    opacity: 1;
    transform: translateY(0);
}

.about-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 1.5rem;
}

.about-title {
    font-size: 56px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.about-intro {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.about-hero-image {
    position: relative;
    overflow: hidden;
}

.about-hero-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.about-hero-image:hover img {
    transform: scale(1.05);
}

/* Story Section */
.about-story {
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.about-overlay.active .about-story {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    color: #666;
}

.about-story-content {
    grid-column: 1;
}

.about-story-content p {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

.about-story-content p:last-child {
    margin-bottom: 0;
}

/* Minimalistic CV Link */
.about-actions {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cv-link {
    display: inline-block;
    font-size: 16px;
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
}

.about-overlay.active .cv-link,
.about-overlay.active .email-copy-btn {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s, all 0.3s ease;
}

.cv-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #000;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.cv-link:hover {
    opacity: 0.6;
}

.cv-link:hover::after {
    transform: scaleX(0);
    transform-origin: right;
}

/* Email Copy Button */
.email-copy-btn {
    display: inline-block;
    font-size: 16px;
    color: #000;
    background: transparent;
    border: none;
    padding: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    font-family: 'Poppins', sans-serif;
}

.email-copy-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #000;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.email-copy-btn:hover {
    opacity: 0.6;
}

.email-copy-btn:hover::after {
    transform: scaleX(0);
    transform-origin: right;
}

/* Email Notification */
.email-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #000;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.email-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Skills Section */
.about-skills {
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.about-overlay.active .about-skills {
    opacity: 1;
    transform: translateY(0);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.skill-item {
    border-top: 2px solid #000;
    padding-top: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-overlay.active .skill-item {
    opacity: 1;
    transform: translateY(0);
}

.about-overlay.active .skill-item:nth-child(1) {
    transition-delay: 0.6s;
}

.about-overlay.active .skill-item:nth-child(2) {
    transition-delay: 0.7s;
}

.about-overlay.active .skill-item:nth-child(3) {
    transition-delay: 0.8s;
}

.about-overlay.active .skill-item:nth-child(4) {
    transition-delay: 0.9s;
}

.skill-item h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.skill-item p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Gallery Section */
.about-gallery {
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.65s, transform 0.6s ease 0.65s;
}

.about-overlay.active .about-gallery {
    opacity: 1;
    transform: translateY(0);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    grid-auto-rows: 150px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-overlay.active .gallery-item {
    opacity: 1;
    transform: translateY(0);
}

.about-overlay.active .gallery-item:nth-child(1) {
    transition-delay: 0.8s;
}

.about-overlay.active .gallery-item:nth-child(2) {
    transition-delay: 0.9s;
}

.about-overlay.active .gallery-item:nth-child(3) {
    transition-delay: 1s;
}

.about-overlay.active .gallery-item:nth-child(4) {
    transition-delay: 1.1s;
}

/* Large landscape image (group photo) */
.gallery-item:nth-child(1) {
    grid-column: 1 / 7;
    grid-row: 1 / 4;
}

/* Wide horizontal image (Live in Hasselt) */
.gallery-item:nth-child(2) {
    grid-column: 7 / 13;
    grid-row: 1 / 3;
}

/* Square-ish image (people sitting) */
.gallery-item:nth-child(3) {
    grid-column: 7 / 10;
    grid-row: 3 / 5;
}

/* Portrait image (couple selfie) */
.gallery-item:nth-child(4) {
    grid-column: 10 / 13;
    grid-row: 3 / 5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Responsive - Mobile First Approach */
/* Extra Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    body {
        overflow-y: auto;
        height: auto;
        max-height: none;
    }

    .navbar {
        position: relative;
        padding: 1rem;
        flex-wrap: wrap;
    }

    .nav-brand {
        font-size: 14px;
    }

    .hero {
        position: relative;
        top: 0;
        padding: 1.5rem 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-image img {
        width: 120px;
        height: 120px;
    }

    .hero-title {
        font-size: 32px;
        letter-spacing: -2px;
    }

    .hero-subtitle {
        font-size: 13px;
        line-height: 1.5;
    }

    .projects-wrapper {
        position: relative;
        bottom: auto;
        padding: 3rem 0 1.5rem 0;
        /* Better mobile scrolling */
        scroll-snap-type: x mandatory;
        scroll-padding: 0 1rem;
    }

    .projects-container {
        padding: 0 1rem;
        gap: 1rem;
    }

    .project-card {
        scroll-snap-align: center;
        /* Ensure cards are easier to tap on mobile */
        min-width: 280px;
    }

    .project-image-container {
        width: 280px;
        height: 280px;
        /* Improve touch target size */
        touch-action: manipulation;
    }

    .project-header {
        font-size: 12px;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .project-more {
        font-size: 12px;
    }

    .project-info-overlay {
        padding: 1.5rem;
    }

    .project-info-title,
    .project-info-year {
        font-size: 16px;
    }

    .project-info-description {
        font-size: 14px;
    }

    .project-info-footer {
        font-size: 14px;
    }

    /* About Overlay Mobile */
    .about-close {
        top: 1rem;
        right: 1rem;
    }

    .about-close svg {
        width: 24px;
        height: 24px;
    }

    .about-content {
        padding: 3rem 1rem 2rem;
    }

    .about-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .about-hero-text {
        max-width: 100%;
    }

    .about-title {
        font-size: 32px;
    }

    .about-intro {
        font-size: 15px;
    }

    .about-hero-image img {
        height: 300px;
    }

    .about-story {
        margin-bottom: 3rem;
        display: block;
    }

    .about-story-content {
        max-width: 100%;
        grid-column: auto;
    }

    .about-story-content p {
        font-size: 14px;
    }

    .about-skills {
        margin-bottom: 3rem;
    }

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

    .about-gallery {
        margin-bottom: 3rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1rem;
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4) {
        grid-column: auto;
        grid-row: auto;
    }

    .gallery-item {
        height: 250px;
    }
}

/* Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        max-height: none;
    }

    .navbar {
        position: relative;
        padding: 1.5rem;
    }

    .nav-brand {
        font-size: 16px;
    }

    .hero {
        position: relative;
        top: 0;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .hero-image img {
        width: 140px;
        height: 140px;
    }

    .hero-title {
        font-size: 45px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .projects-wrapper {
        position: relative;
        bottom: auto;
        padding: 3rem 0 2rem 0;
    }

    .projects-container {
        padding: 0 1.5rem;
    }

    .project-image-container {
        width: 300px;
        height: 300px;
    }

    .project-header {
        font-size: 14px;
    }

    .project-more {
        font-size: 14px;
    }

    /* About Overlay */
    .about-close {
        top: 1.5rem;
        right: 1.5rem;
    }

    .about-content {
        padding: 4rem 1.5rem 3rem;
    }

    .about-hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 4rem;
    }

    .about-hero-text {
        max-width: 100%;
    }

    .about-title {
        font-size: 40px;
    }

    .about-intro {
        font-size: 16px;
    }

    .about-hero-image img {
        height: 400px;
    .about-story {
        margin-bottom: 4rem;
        display: block;
    }

    .about-story-content {
        max-width: 100%;
        grid-column: auto;
    }
        max-width: 100%;
    }

    .about-story-content p {
        font-size: 15px;
    }

    .about-skills {
        margin-bottom: 4rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .about-gallery {
        margin-bottom: 4rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(8, 1fr);
        grid-auto-rows: 120px;
        gap: 1rem;
    }

    .gallery-item:nth-child(1) {
        grid-column: 1 / 5;
        grid-row: 1 / 3;
    }

    .gallery-item:nth-child(2) {
        grid-column: 5 / 9;
        grid-row: 1 / 3;
    }

    .gallery-item:nth-child(3) {
        grid-column: 1 / 5;
        grid-row: 3 / 5;
    }

    .gallery-item:nth-child(4) {
        grid-column: 5 / 9;
        grid-row: 3 / 5;
    }
}

/* Responsive - Tablets and Small Laptops */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar {
        padding: 2rem;
    }

    .nav-brand {
        font-size: 18px;
    }

    .hero {
        padding: 5rem 2rem 0;
        gap: 2rem;
    }

    .hero-image img {
        width: 150px;
        height: 150px;
    }

    .hero-title {
        font-size: 65px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .project-image-container {
        width: 380px;
        height: 380px;
    }

    .projects-container {
        gap: 1.25rem;
        padding: 0 2rem;
    }

    .project-header {
        font-size: 15px;
    }

    .project-more {
        font-size: 15px;
    }

    /* About Overlay */
    .about-content {
        padding: 4.5rem 2rem 3.5rem;
    }

    .about-hero {
        gap: 3rem;
        margin-bottom: 5rem;
    }

    .about-title {
        font-size: 48px;
    }

    .about-hero-image img {
        height: 450px;
    }

    .about-story {
        margin-bottom: 5rem;
    }

    .about-skills {
        margin-bottom: 5rem;
    }

    .about-gallery {
        margin-bottom: 5rem;
    }
}

/* Responsive - Large Tablets and Medium Laptops */
@media (min-width: 1025px) and (max-width: 1440px) {
    .hero-title {
        font-size: 85px;
    }

    .hero-subtitle {
        font-size: 19px;
    }

    .nav-brand {
        font-size: 19px;
    }

    .project-image-container {
        width: 450px;
        height: 450px;
    }

    .project-header {
        font-size: 16px;
    }

    .projects-container {
        gap: 1.5rem;
    }
}

/* Responsive - Large Desktop displays */
@media (min-width: 1441px) and (max-width: 1999px) {
    .hero-title {
        font-size: 95px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .project-image-container {
        width: 490px;
        height: 490px;
    }
}

/* Responsive - Extra Large Desktop displays */
@media (min-width: 2000px) {
    .hero-title {
        font-size: 110px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .nav-brand {
        font-size: 20px;
    }

    .project-image-container {
        width: 750px;
        height: 750px;
    }

    .project-header {
        font-size: 16px;
    }
    
    .projects-container {
        gap: 30px;
    }
}

/* Height-based responsive - Scale down projects when height is limited */
@media (max-height: 950px) {
    .project-image-container {
        width: 400px;
        height: 400px;
    }
}

@media (max-height: 900px) {
    .project-image-container {
        width: 370px;
        height: 370px;
    }
    
    .hero-title {
        font-size: 85px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .navbar {
        padding: 2rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 18px;
    }
    
    .hero {
        top: 40px;
        padding: 5.5rem 2.5rem 0 2.5rem;
    }
}

@media (max-height: 850px) {
    .project-image-container {
        width: 340px;
        height: 340px;
    }
    
    .hero-title {
        font-size: 75px;
    }
    
    .hero-subtitle {
        font-size: 17px;
    }
    
    .navbar {
        padding: 1.8rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 17px;
    }
    
    .hero {
        top: 35px;
        padding: 5.2rem 2.5rem 0 2.5rem;
    }
}

@media (max-height: 800px) {
    .project-image-container {
        width: 310px;
        height: 310px;
    }
    
    .hero-title {
        font-size: 70px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .navbar {
        padding: 1.5rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 16px;
    }
    
    .hero {
        top: 30px;
        padding: 4.8rem 2.5rem 0 2.5rem;
    }
}

@media (max-height: 750px) {
    .project-image-container {
        width: 280px;
        height: 280px;
    }
    
    .hero-title {
        font-size: 65px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .navbar {
        padding: 1.3rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 15px;
    }
    
    .hero {
        top: 25px;
        padding: 4.3rem 2.5rem 0 2.5rem;
    }
}

@media (max-height: 700px) {
    .project-image-container {
        width: 250px;
        height: 250px;
    }
    
    .hero-title {
        font-size: 58px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .navbar {
        padding: 1.2rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 14px;
    }
    
    .hero {
        top: 20px;
        padding: 3.8rem 2.5rem 0 2.5rem;
    }
    
    .hero-image img {
        width: 160px;
        height: 160px;
    }
}

@media (max-height: 650px) {
    .project-image-container {
        width: 220px;
        height: 220px;
    }
    
    .hero-title {
        font-size: 50px;
    }
    
    .hero-subtitle {
        font-size: 13px;
    }
    
    .navbar {
        padding: 1rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 13px;
    }
    
    .hero {
        top: 15px;
        padding: 3.3rem 2.5rem 0 2.5rem;
    }
    
    .hero-image img {
        width: 140px;
        height: 140px;
    }
    
    .project-header {
        font-size: 14px;
    }
}

@media (max-height: 600px) {
    .project-image-container {
        width: 190px;
        height: 190px;
    }
    
    .hero-title {
        font-size: 45px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .navbar {
        padding: 0.8rem 2.5rem;
    }
    
    .nav-brand {
        font-size: 12px;
    }
    
    .hero {
        top: 10px;
        padding: 2.8rem 2.5rem 0 2.5rem;
    }
    
    .hero-image img {
        width: 120px;
        height: 120px;
    }
    
    .project-header {
        font-size: 12px;
    }
}

.hero-subtitle.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}

.hero-subtitle.fade-in {
    opacity: 1;
    transform: translateX(0);
}

/* Subtle emphasis for taglines */
.hero-subtitle[style*="color: rgb(51, 51, 51)"],
.hero-subtitle[style*="color:#333"],
.hero-subtitle[style*="color: #333"] {
    font-style: italic;
    letter-spacing: 0.5px;
}

/* Hero Subtitle Animation - Slide & Fade Effect */
.hero-subtitle {
    color: #333 !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
}

/* Slide out animation - moves left and fades */
.hero-subtitle.slide-out {
    opacity: 0;
    transform: translateX(-30px);
}

/* Slide in animation - comes from right and fades in */
.hero-subtitle.slide-in {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInFromRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Base styles for project media (both images and videos) */
.project-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.3s ease;
    will-change: transform;
}

/* Video specific styles */
.project-video {
    display: block;
    background: #000;
    cursor: pointer;
}

/* Ensure video maintains aspect ratio */
.project-video {
    object-position: center;
}

/* Hover effect for media container */
.project-image-container:hover .project-media {
    transform: scale(1.05);
}

/* Loading state for videos */
.project-video:not([src]) {
    background: #f5f5f5;
}

/* Mobile optimizations for video */
@media (max-width: 768px) {
    /* Ensure smooth video playback on mobile */
    .project-video {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Ensure videos don't scale during info overlay */
.project-info-overlay.active ~ .project-video {
    transform: scale(1) !important;
}

/* Height-based responsive for videos */
@media (max-height: 900px) {
    .project-video::-webkit-media-controls {
        transform: scale(0.9);
    }
}

@media (max-height: 700px) {
    .project-video::-webkit-media-controls {
        transform: scale(0.8);
    }
}

/* Accessibility: Focus styles for video controls */
.project-video:focus {
    outline: 2px solid #000;
    outline-offset: 4px;
}

/* Ensure smooth transitions between media types */
.project-media {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Mobile optimization - Disable project info overlay on mobile devices */
@media (max-width: 768px) {
    /* Hide the "more" link on mobile */
    .project-more {
        display: none;
    }
    
    /* Make sure the overlay cannot be triggered on mobile */
    .project-image-container {
        cursor: default;
    }
    
    .project-info-overlay {
        display: none !important;
    }
}