/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'K2D', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    position: relative;
    transition: background-color 0.6s ease;
}

/* Background reveal animation on body */
body.background-animating {
    background-color: #000000;
    position: relative;
    overflow: hidden;
}

/* Rectangle that grows from center - this IS the background */
body.background-animating::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--target-bg-color, #1a1a1a);
    z-index: -1;
    pointer-events: none;
    /* Start with rectangle at center (0% size) */
    clip-path: inset(50% 50% 50% 50%);
}

body.background-reveal-animate::before {
    animation: backgroundRevealGrow 1s ease-out forwards;
}

@keyframes backgroundRevealGrow {
    0% {
        /* Rectangle at center with 0% size */
        clip-path: inset(50% 50% 50% 50%);
    }
    100% {
        /* Grow to full screen - rectangle covers entire viewport */
        clip-path: inset(0% 0% 0% 0%);
    }
}

/* Projects pages can scroll – body is the scroll container */
.page-games,
.page-others,
.page-contact {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}

.contact-title::selection,
.projects-main-title::selection,
.main-title::selection {
    background-color: transparent;
    color: fff;
    -webkit-text-fill-color: transparent;
}

.contact-title::-moz-selection,
.projects-main-title::-moz-selection,
.main-title::-moz-selection {
    background-color: transparent;
    color: fff;
    -webkit-text-fill-color: transparent;
}

.contact-title::-webkit-selection,
.projects-main-title::-webkit-selection,
.main-title::-webkit-selection {
    background-color: transparent;
    color: fff;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 15vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    z-index: 100;
    pointer-events: none;
}

.header > * {
    pointer-events: auto;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.page-index {
    font-size: 1.25rem;
    color: #888;
    font-weight: 500;
}

.page-title {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 400;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.main-title {
    font-size: clamp(1.5rem, 5vw, 4rem);
    font-weight: 450;
    color: #f5f5dc;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: color 0.6s ease;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
}

.music-toggle,
.menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem; 
    font-family: inherit;
    padding: 0.5rem;
    transition: opacity 0.3s ease;
}

.music-toggle:hover,
.menu-toggle:hover {
    opacity: 0.7;
}

.music-toggle svg {
    width: 24px;
    height: 24px;
}

/* Audio Visualizer - Animation handled by JavaScript */

.menu-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.menu-text {
    text-decoration: underline;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    height: 100vh;
    padding-top: 20vh;
    overflow: hidden;
}

/* Contact page can scroll */
.page-contact .main-content {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
    padding-top: 10vh;
}

/* Projects pages can scroll */
.page-games,
.page-others {
    overflow-y: auto;
    overflow-x: hidden;
}

.page-games .main-content,
.page-others .main-content {
    overflow: visible;
    height: auto;
    min-height: 100vh;
}

/* ============================================
   CAROUSEL (Landing Page)
   ============================================ */

.carousel-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 20vh - 20vh);
    max-height: 60vh;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 3rem;
    margin-top: 5vh;
}

/* Project Info (Left) */
.project-info {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    align-self: flex-start;
    max-width: 20vw;
}

.project-number {
    font-size: 1rem;
    color: #888;
    font-weight: 500;
}

.project-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 400;
    color: #ffffff;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.project-year {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 300;
}

.project-genre {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 300;
}

.project-description {
    font-size: 1.15rem;
    color: #f5f5f59f;
}

/* Carousel Wrapper (Center) */
.carousel-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 75%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    perspective: 1200px;
    align-self: flex-start;
}

.carousel-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s ease,
                z-index 0.6s ease,
                box-shadow 0.4s ease;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16 / 9;
}

.carousel-image.active {
    z-index: 5;
    transform: translateZ(0) scale(1);
    opacity: 1;
}

.carousel-image.active:hover {
    transform: translateZ(0) scale(1.015);
    box-shadow: 0 12px 50px rgba(255, 255, 255, 0.15),
                0 10px 40px rgba(0, 0, 0, 0.6);
}

.carousel-image.active:active {
    transform: translateZ(0) scale(0.98);
}

.carousel-image.behind-1 {
    z-index: 4;
    transform: translateZ(-60px) scale(0.95) translateY(-40px);
    opacity: 0.85;
}

.carousel-image.behind-1:hover {
    transform: translateZ(-60px) scale(0.96) translateY(-40px);
    box-shadow: 0 12px 50px rgba(255, 255, 255, 0.12),
                0 10px 40px rgba(0, 0, 0, 0.55);
}

.carousel-image.behind-2 {
    z-index: 3;
    transform: translateZ(-120px) scale(0.90) translateY(-80px);
    opacity: 0.7;
}

.carousel-image.behind-2:hover {
    transform: translateZ(-120px) scale(0.91) translateY(-80px);
    box-shadow: 0 12px 50px rgba(255, 255, 255, 0.1),
                0 10px 40px rgba(0, 0, 0, 0.5);
}

.carousel-image.behind-3 {
    z-index: 2;
    transform: translateZ(-180px) scale(0.85) translateY(-120px);
    opacity: 0.55;
}

.carousel-image.behind-3:hover {
    transform: translateZ(-180px) scale(0.86) translateY(-120px);
    box-shadow: 0 12px 50px rgba(255, 255, 255, 0.08),
                0 10px 40px rgba(0, 0, 0, 0.45);
}

.carousel-image.behind-4 {
    z-index: 1;
    transform: translateZ(-240px) scale(0.80) translateY(-160px);
    opacity: 0.4;
}

/* Scroll Indicator (Right) */
.scroll-indicator {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    align-self: flex-start;
}

.scroll-text {
    font-size: 1rem;
    color: #ffffff;
    font-style: italic;
    font-weight: 300;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.footer > * {
    pointer-events: auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    padding: 1.5rem 3rem;
    position: relative;
}

.footer-email {
    justify-self: start;
}

.footer-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 16px;
    background-color: transparent;
    justify-self: center;
}

.footer-time {
    justify-self: end;
}

/* Footer sans barre (Games/Others) */
.page-games .footer-top,
.page-others .footer-top {
    grid-template-columns: 1fr auto;
    justify-content: space-between;
}

.page-games .footer-time,
.page-others .footer-time {
    justify-self: end;
}

/* Footer contact page - only time */
.page-contact .footer-top {
    grid-template-columns: 1fr;
    justify-content: flex-end;
}

.page-contact .footer-time {
    justify-self: end;
}

.footer-time {
    flex: 0 0 auto;
}

.footer-email {
    flex: 0 0 auto;
    color: #ffffff;
    text-decoration: underline;
    font-size: 1.15rem;
    transition: opacity 0.3s ease;
}

.footer-email:hover {
    opacity: 0.7;
}

.footer-time {
    color: #ffffff;
    font-size: 1.15rem;
}

.project-index {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    height: 16px;
    flex: 0 0 auto;
}

/* Segment de barre pour chaque index (sous l'index) */
.project-index::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 20px;
    height: 2px;
    background-color: #888;
    z-index: 0;
}

.project-index.active::after {
    background-color: #ffffff;
}

/* Séparateur vertical entre les indices */
.project-index:not(:last-child)::before {
    content: '';
    position: absolute;
    right: -1px;
    top: 0;
    width: 1px;
    height: 16px;
    background-color: transparent;
    z-index: 1;
}

.project-index-number {
    font-size: 0.875rem;
    color: #888;
    font-weight: 400;
    padding: 0 1.5rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.project-index.active .project-index-number {
    color: #ffffff;
    font-weight: 500;
}

.project-index {
    transition: opacity 0.3s ease;
}

.project-index:hover {
    opacity: 0.7;
}

/* ============================================
   MENU OVERLAY
   ============================================ */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000;
    z-index: 1000;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: flex;
    opacity: 1;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    height: 15vh;
}

.menu-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.menu-header-left .page-index {
    font-size: 1.25rem;
    color: #888;
    font-weight: 500;
}

.menu-header-left .page-title {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 400;
}

.menu-header-right {
    display: flex;
    align-items: center;
}

.menu-close {
    background: none;
    border: none;
    color: #f5f5dc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-family: inherit;
    padding: 0.5rem;
    transition: opacity 0.3s ease;
}

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

.menu-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 9rem;
    gap: 0.75rem;
}

.menu-link {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    color: #f5f5dc;
    text-decoration: none;
    font-weight: 300;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 10;
    display: inline-block;
}

.menu-link:hover {
    transform: translateX(10px);
}

.menu-nav {
    position: relative;
    z-index: 10;
}

.menu-hover-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.menu-hover-image {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================
   PROJECTS PAGES (Games/Others)
   ============================================ */

.projects-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Background Slideshow */
.background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.background-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    filter: blur(10px);
}

.background-slideshow img.active {
    opacity: 1;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

/* Title Section */
.projects-title-section {
    position: relative;
    z-index: 10;
    margin-top: -12.5vh;
    margin-bottom: 5vh;
    text-align: center;
}

.projects-main-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    font-family: 'K2D', sans-serif;
    mix-blend-mode: difference;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Title animation letters */
.title-letter {
    display: inline-block;
    transition: all 0.3s ease;
}

.title-letter-space {
    display: inline-block;
}

/* GIFs décoratifs autour du titre (à ajouter manuellement si nécessaire) */
.projects-title-section {
    position: relative;
}

.projects-title-gif {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 5;
}

/* Projects Grid */
.projects-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 3rem;
    max-width: 1400px;
    margin: 2rem auto 0;
}

.project-card {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.25s;
    border-radius: 8px;
    box-shadow: 0 0 0.5em #a0a0a0a0;
}

.project-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 3em #a0a0a0a0;
}

.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-card-overlay {
    transform: translateY(0);
}

.project-card-info {
    flex: 1;
    min-width: 0;
}

.project-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.project-card-year {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 300;
}

/* Tool icons: bottom-right, stacked from bottom to top */
.project-card-tools {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.project-card-tool-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.project-card-tool-icon:hover {
    opacity: 1;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-page {
    position: relative;
    width: 100%;
    min-height: 60vh;
    padding-top: 3rem;
    padding-left: 10rem;
    display: flex;
    align-items: flex-start;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 80vw;
    width: 100%;
    align-items: flex-start;
}

.contact-text-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-title {
    font-size: 4vw;
    font-weight: 500;
    color: #000000;
    line-height: 0.8;
    margin: 0;
    cursor: pointer;
}

.contact-description {
    font-size: 1.25vw;
    font-weight: 350;
    color: #000000;
    line-height: 1.5;
    margin: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
    margin: 0;
}

.contact-email {
    font-size: 2.8vw;
}
.contact-phone {
    font-size: 2.25vw;
}

.contact-email,
.contact-phone {
    font-weight: 400;
    color: #000000;
    text-decoration: underline;
    margin: 0;
    transition: opacity 0.2s ease;
}

.contact-email:hover,
.contact-phone:hover {
    opacity: 0.7;
}

.personnal-information {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-left: 10vh;
}

.personnal-text p {
    padding: 2rem 0 0 2rem;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1vw;
    font-weight: 350;
}

.biggerText {
    font-size: 1.5vw;
    font-weight: 650;
}

.accentuateText {
    text-shadow: 2px 0 #ffd700, -2px 0 #ffd700, 0 2px #ffd700, 0 -2px #ffd700,
                    1px 1px #ffd700, -1px -1px #ffd700, 1px -1px #ffd700, -1px 1px #ffd700;
}

.personnal-image img {
    width: 85%;
    border-radius: 1rem;
    box-shadow: 0 10px 30px #efedeea0;
}

.contact-social-section {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-row: 2;
    grid-column: 1 / 3;
}

.social-icons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4rem;
    padding: 2rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 8vw;
    aspect-ratio: 1;
    background-color: #ffffff;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.social-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.social-icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* Itch.io specific styling */
#social-itchio {
    background-color: #fa5c5c;
}

/* LinkedIn specific styling */
#social-linkedin {
    background-color: #0077b5;
}

/* GitHub specific styling */
#social-github {
    background-color: #000000;
}

/* CV specific styling */
#social-artstation {
    background-color: #000000;
}

/* CV specific styling */
#social-cv {
    background-color: #ffffff;
}

/* ============================================
   PAGE SPECIFIC STYLES
   ============================================ */

/* Contact page - black text on cream background */
.page-contact {
    background-color: #f5f5dc;
    color: #000000;
}

.page-contact .header-left .page-index,
.page-contact .header-left .page-title,
.page-contact .header-center .main-title,
.page-contact .header-right .music-toggle,
.page-contact .header-right .menu-toggle,
.page-contact .footer-email,
.page-contact .footer-time {
    color: #000000;
}

.page-contact .music-toggle svg,
.page-contact .menu-toggle {
    color: #000000;
}

/* Menu overlay - text should be white when opened from contact page */
.page-contact .menu-overlay.active .menu-header-left .page-index,
.page-contact .menu-overlay.active .menu-header-left .page-title,
.page-contact .menu-overlay.active .menu-header-right .music-toggle,
.page-contact .menu-overlay.active .menu-header-right .menu-close,
.page-contact .menu-overlay.active .menu-link {
    color: #f5f5dc;
}

.page-contact .menu-overlay.active .music-toggle svg {
    color: #f5f5dc;
}

/* ============================================
   MUSIC TOOLTIP
   ============================================ */

.music-tooltip {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    font-family: 'K2D', sans-serif;
    /* Ensure no other transforms or animations interfere */
    will-change: transform, opacity;
    transform-origin: top center;
    /* Reset any inherited properties that might interfere */
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    /* Explicit initial state - start from above */
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.music-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.music-tooltip-text {
    background-color: rgba(20, 20, 20, 0.95);
    color: #ffffff;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.music-tooltip-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: none;
    border-bottom: 8px solid rgba(20, 20, 20, 0.95);
    transform: translateX(-50%);
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.5));
}

#menuTitle {
    color: #f5f5dc;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* Header Mobile */
    .header {
        padding: 1rem 1.5rem;
        height: 12vh;
    }

    .page-index,
    .page-title {
        font-size: 1rem;
    }

    .main-title {
        font-size: clamp(1.2rem, 6vw, 2.5rem);
    }

    .header-right {
        gap: 0.5rem;
    }

    .music-toggle,
    .menu-toggle {
        font-size: 1rem;
        padding: 0.25rem;
    }

    .music-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* Main Content Mobile */
    .main-content {
        padding-top: 12vh;
        padding-bottom: 15vh;
    }

    /* Landing Page Carousel Mobile */
    .carousel-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 1.5rem;
        gap: 2rem;
        margin-top: 2vh;
    }

    .carousel-wrapper {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        height: 40vh;
        max-width: none;
        order: 2;
    }

    .project-info {
        order: 1;
        width: 100%;
        gap: 0.25rem;
    }

    .project-number {
        font-size: 0.875rem;
    }

    .project-title {
        font-size: clamp(1.25rem, 5vw, 2rem);
    }

    .project-year,
    .project-genre {
        font-size: 1rem;
    }

    .scroll-indicator {
        order: 3;
        width: 100%;
        justify-content: flex-end;
        margin-top: 1rem;
    }

    .scroll-text {
        font-size: 0.875rem;
    }

    /* Footer Mobile */
    .footer {
        padding: 1rem 1.5rem;
        padding-bottom: 1rem;
    }

    .footer-top {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0;
    }

    .footer-email {
        font-size: clamp(0.875rem, 3vw, 1rem);
    }

    .footer-bar {
        width: 100%;
        order: 2;
        display: flex;
        justify-content: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .project-index-number {
        font-size: 0.75rem;
        padding: 0 0.75rem;
    }

    .footer-time {
        font-size: clamp(0.875rem, 3vw, 1rem);
        order: 3;
    }

    /* Menu Overlay Mobile */
    .menu-header {
        padding: 1.5rem 1.5rem;
        height: auto;
        min-height: 15vh;
    }

    .menu-nav {
        padding-left: 1.5rem;
        gap: 0.75rem;
    }

    .menu-link {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    /* Projects Pages Mobile */
    .projects-title-section {
        padding: 1.5rem;
        margin-top: -5vh;
        margin-bottom: 3vh;
    }

    .projects-main-title {
        font-size: clamp(2rem, 12vw, 4rem);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .project-card {
        border-radius: 6px;
    }

    /* Contact Page Mobile */
    .contact-page {
        padding: 2rem 1.5rem;
        padding-left: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-text-section {
        order: 1;
    }

    .contact-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .contact-description {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .contact-email {
        font-size: clamp(1.25rem, 6vw, 2.5rem);
    }

    .contact-phone {
        font-size: clamp(1rem, 5vw, 2rem);
    }

    .contact-social-section {
        order: 2;
        padding-bottom: 3rem;
    }

    .social-icons-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        gap: 1.5rem;
    }

    .social-icon {
        width: 100%;
        aspect-ratio: 1;
    }
}

/* Mobile Portrait (smaller screens) */
@media (max-width: 480px) {
    .header {
        padding: 0.75rem 1rem;
        height: 10vh;
    }

    .main-content {
        padding-top: 10vh;
        padding-bottom: 12vh;
    }

    .carousel-container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .carousel-wrapper {
        height: 35vh;
    }

    .footer {
        padding: 0.75rem 1rem;
    }

    .menu-header {
        padding: 1rem;
    }

    .menu-nav {
        padding-left: 1rem;
    }

    .projects-title-section {
        padding: 1rem;
        margin-top: -3vh;
    }

    .projects-grid {
        padding: 1rem;
        gap: 1rem;
    }

    .contact-page {
        padding: 1.5rem 1rem;
    }

    .social-icons-grid {
        gap: 1rem;
    }
}

