/* Agrandir Font Family */
@font-face {
    font-family: 'Agrandir';
    src: url('assets/fonts/Agrandir-Font-Family/Agrandir - Free For Personal Use/Agrandir-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Agrandir';
    src: url('assets/fonts/Agrandir-Font-Family/Agrandir - Free For Personal Use/Agrandir-TextBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Agrandir';
    src: url('assets/fonts/Agrandir-Font-Family/Agrandir - Free For Personal Use/Agrandir-GrandHeavy.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Agrandir';
    src: url('assets/fonts/Agrandir-Font-Family/Agrandir - Free For Personal Use/Agrandir-GrandLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'TT Ramillas';
    src: url('assets/fonts/tt_ramillas/TT Ramillas Trial Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Agrandir', Arial, sans-serif;
    color: #2c2c2c;
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #b8a3b3;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(100, 96, 98, 0.39);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Hamburger Menu Button - Hidden by default */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

.nav-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 0 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #d0d0d0;
}

.nav-link-portfolio {
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 1rem;
}

/* Phase 3: Smooth Scroll & Nav - Active State and Sticky Behavior */
.navbar-scrolled {
    background: rgba(100, 96, 98, 0.6);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-link-active {
    color: #b9b9c2;
    position: relative;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(185, 185, 194, 0.4),
        rgba(220, 220, 228, 0.9),
        rgba(185, 185, 194, 0.4)
    );
    border-radius: 2px;
}

/* Reduced motion override for nav transitions */
@media (prefers-reduced-motion: reduce) {
    .navbar,
    .nav-link {
        transition: none;
    }
}

/* Section Titles with Liquid Chrome SVGs */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.section-title > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.section-title img {
    height: 120px;
    width: auto;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-image: url('assets/images/backgrounds/HeroBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 2rem 4rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide hero content initially to prevent flash before intro */
.hero-name img,
.film-strip-container {
    opacity: 0;
    visibility: hidden;
}

/* Explore button - start hidden, GSAP will handle showing it */
.explore-btn {
    opacity: 0;
    visibility: hidden;
}

.hero-liquid-top-left {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 350px;
    height: auto;
    z-index: 1;
    opacity: 0.9;
}

.hero-liquid-bottom-right {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 350px;
    height: auto;
    z-index: 1;
    opacity: 0.9;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-name-line1,
.hero-name-line2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

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

.film-strip-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.film-strip {
    max-width: 800px;
    width: 100%;
    height: auto;
}

.explore-btn {
    width: 160px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 2rem auto;
    display: block;
}

.explore-btn:hover {
    transform: scale(1.05);
}

/* About Section */
.about {
    min-height: 100vh;
    background-image: url('assets/images/backgrounds/AboutBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 2rem;
    position: relative;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.profile-image {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.profile-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 35px rgba(0,0,0,0.25));
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.about-title-line1,
.about-title-line2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.about-title img {
    height: 100px;
    width: auto;
}

.about-text {
    /* No background - just text */
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.15rem;
    color: #545454;
    font-weight: 700;
}

/* Skills Section - Two Parts */
.skills {
    min-height: 200vh;
    background-image: url('assets/images/backgrounds/SkillsBackground.png'), url('assets/images/backgrounds/SkillsBackgroundPage2.png');
    background-size: 100% 50%, 100% 50%;
    background-position: top, bottom;
    background-repeat: no-repeat, no-repeat;
    position: relative;
}

.skills-part1 {
    min-height: 100vh;
    position: relative;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-part2 {
    min-height: 100vh;
    position: relative;
    padding: 6rem 2rem 8rem;
    overflow: visible;
}

.skills-liquid-bottom-left {
    position: absolute;
    bottom: 0;
    left: -30px;
    width: 250px;
    height: auto;
    z-index: 1;
    opacity: 0.85;
}

/* Skills Sticky Note */
.skills-sticky-note {
    position: absolute;
    top: 15%;
    right: 8%;
    width: 130px;
    height: auto;
    transform: rotate(-6deg);
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.25));
    z-index: 10;
    pointer-events: none;
    animation: skillsStickyFloat 5s ease-in-out infinite;
}

@keyframes skillsStickyFloat {
    0%, 100% {
        transform: rotate(-6deg) translateY(0);
    }
    50% {
        transform: rotate(-6deg) translateY(-10px);
    }
}

.skills-liquid-page2-top-left {
    position: absolute;
    top: -24px;
    left: 0;
    width: 280px;
    height: auto;
    z-index: 1;
    opacity: 0.85;
}

.skills-liquid-page2-bottom-middle {
    position: absolute;
    bottom: 0;
    left: 21.4%;
    transform: translateX(-50%);
    width: 830px;
    height: auto;
    z-index: 1;
    opacity: 0.85;
}

.skills-liquid-page2-bottom-right {
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 320px;
    height: auto;
    z-index: 1;
    opacity: 0.85;
}

.skills-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* Scattered Software Icons */
.software-icons-scattered {
    max-width: 1200px;
    width: 100%;
    height: 500px;
    margin: 4rem auto;
    position: relative;
    z-index: 2;
}

.software-icons-scattered .icon-item {
    position: absolute;
    cursor: grab;
    user-select: none;
}

.software-icons-scattered .icon-item:active {
    cursor: grabbing;
}

.software-icons-scattered .icon-item img {
    width: 120px;
    height: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.software-icons-scattered .icon-item:hover img {
    transform: scale(1.1);
}

/* Icon Positions - Matching the design */
.icon-after-effects {
    top: 10%;
    left: 8%;
}

.icon-illustrator {
    top: 45%;
    left: 15%;
}

.icon-maya {
    top: 70%;
    left: 5%;
}

.icon-word {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.icon-powerpoint {
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
}

.icon-photoshop {
    top: 15%;
    right: 10%;
}

.icon-teams {
    top: 5%;
    right: 25%;
}

.icon-folder {
    top: 70%;
    right: 8%;
}

/* Skills Content - Part 2 */
.skills-content {
    max-width: 1400px;
    margin: 4rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    position: relative;
    z-index: 2;
}

.skills-left,
.skills-right {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skills-category {
    /* No background - transparent */
    background: transparent;
    padding: 0;
}

.skills-left .skills-category ul {
    column-count: 2;
    column-gap: 2rem;
}

.movie-slate {
    width: 140px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.movie-star {
    width: 200px;
    height: auto;
    display: block;
    margin: 2.5rem auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.movie-popcorn {
    width: 250px;
    height: auto;
    display: block;
    margin: 2.5rem auto 0;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.skills-category h3 {
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #332d46;
    font-weight: 700;
}

.skills-left .skills-category h3 {
    text-align: center;
}

.skills-category ul {
    list-style: none;
}

.skills-category li {
    padding: 0.3rem 0;
    padding-left: 1.8rem;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.6;
    font-family: 'Agrandir', Arial, sans-serif;
    color: #332d46;
    break-inside: avoid;
    page-break-inside: avoid;
}

.skills-category li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #332d46;
    font-weight: bold;
    font-size: 1.2rem;
}

/* My Work Section */
.work {
    min-height: 100vh;
    background-image: url('assets/images/backgrounds/WorkBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 2rem 6rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-liquid-design {
    position: absolute;
    top: 0;
    left: -6%;
    height: 100%;
    width: auto;
    max-width: none;
    z-index: 0;
    opacity: 0.65;
}

/* Work Sticky Note */
.work-sticky-note {
    position: absolute;
    bottom: 8%;
    right: 2%;
    width: 120px;
    height: auto;
    transform: rotate(10deg);
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.25));
    z-index: 10;
    pointer-events: none;
    animation: workStickyFloat 4.5s ease-in-out infinite;
}

@keyframes workStickyFloat {
    0%, 100% {
        transform: rotate(10deg) translateY(0);
    }
    50% {
        transform: rotate(10deg) translateY(-8px);
    }
}

.work-layout {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    z-index: 2;
}

/* Position MY WORK title on the right side */
.work .section-title {
    position: relative;
    right: auto;
    top: auto;
    text-align: center;
    align-items: center;
    margin-bottom: 0;
    z-index: 2;
}

.work-title-line1,
.work-title-line2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.work-title-line1 img,
.work-title-line2 img {
    height: 120px;
    width: auto;
}

.work-gallery {
    width: 680px;
    max-width: 100%;
    flex: 0 1 680px;
    margin: 0;
    position: relative;
    min-height: 360px;
    z-index: 2;
    padding-top: 5%;
}

.work-section {
    position: absolute;
}

/* Burn Mouth Section - Left side with folder as base */
.burn-mouth {
    top: 0px;
    left: 0px;
    width: 300px;
}

/* Polaroid images on Burn Mouth folder */
.polaroid-top-top-right {
    position: absolute;
    width: 78px;
    height: auto;
    top: 8px;
    right: 28px;
    transform: rotate(7deg);
    z-index: 4;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.polaroid-top-bottom-right {
    position: absolute;
    width: 76px;
    height: auto;
    top: 50px;
    right: 8px;
    transform: rotate(-5deg);
    z-index: 5;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.polaroid-bottom-left {
    position: absolute;
    width: 82px;
    height: auto;
    bottom: 48px;
    left: 10px;
    transform: rotate(-8deg);
    z-index: 4;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.polaroid-bottom-top-right {
    position: absolute;
    width: 76px;
    height: auto;
    bottom: 96px;
    right: 22px;
    transform: rotate(9deg);
    z-index: 3;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.polaroid-bottom-bottom-right {
    position: absolute;
    width: 80px;
    height: auto;
    bottom: 50px;
    right: 6px;
    transform: rotate(-5deg);
    z-index: 6;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.polaroid-top-top-right:hover,
.polaroid-top-bottom-right:hover,
.polaroid-bottom-left:hover,
.polaroid-bottom-top-right:hover,
.polaroid-bottom-bottom-right:hover {
    transform: rotate(0deg) scale(1.1);
    z-index: 100;
}

.polaroid-group {
    position: relative;
    width: 100%;
    height: 310px;
}

/* Burn Mouth Folder - Base layer */
.folder-image {
    position: absolute;
    width: 255px;
    height: auto;
    bottom: 8px;
    left: 16px;
    transform: rotate(2deg);
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* Burn Mouth Main Poster - Stacked on top of folder */
.main-poster-image {
    position: absolute;
    width: 90px;
    height: auto;
    top: 18px;
    left: 18px;
    transform: rotate(-8deg);
    z-index: 2;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    cursor: pointer;
}

.main-poster-image:hover {
    transform: rotate(0deg) scale(1.08);
    z-index: 100;
}

/* Posters Section - Right side next to Burn Mouth */
.posters {
    top: 0px;
    left: 320px;
    width: 340px;
}

.work-poster-decor {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 100px;
    height: auto;
    transform: rotate(6deg);
    z-index: 7;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    transition: transform 0.3s ease;
    cursor: pointer;
}

.work-poster-decor:hover {
    transform: rotate(0deg) scale(1.1);
    z-index: 100;
}

.poster-grid {
    position: relative;
    width: 100%;
    height: 320px;
}

.poster {
    position: absolute;
    height: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.25));
    cursor: pointer;
}

/* Doechii Poster - Upper Right */
.poster:nth-child(1) {
    width: 108px;
    top: 50px;
    left: 208px;
    transform: rotate(8deg);
    z-index: 7;
}

/* The Weeknd Poster - Bottom Left */
.poster:nth-child(2) {
    width: 112px;
    top: 170px;
    left: 18px;
    transform: rotate(-6deg);
    z-index: 3;
}

/* Uncle Waffles Poster - Middle */
.poster:nth-child(3) {
    width: 122px;
    top: 92px;
    left: 118px;
    transform: rotate(4deg);
    z-index: 5;
}

/* Gen Z Poster - Top Left */
.poster:nth-child(4) {
    width: 104px;
    top: -8px;
    left: 4px;
    transform: rotate(-7deg);
    z-index: 4;
}

/* Bridging The Gap Poster - Top Middle */
.poster:nth-child(5) {
    width: 112px;
    top: -70px;
    left: 134px;
    transform: rotate(10deg);
    z-index: 6;
}

/* Individual poster hover effects - lift on hover */
.poster:nth-child(1):hover,
.poster:nth-child(2):hover,
.poster:nth-child(3):hover,
.poster:nth-child(4):hover,
.poster:nth-child(5):hover {
    transform: rotate(0deg) scale(1.1) !important;
    z-index: 100 !important;
}

/* Poster Folder - Base layer at the bottom - NO hover effect */
.poster:nth-child(6),
.poster-folder {
    width: 280px;
    bottom: 8px;
    left: 28px;
    transform: rotate(-1deg) !important;
    z-index: 1 !important;
    cursor: default !important;
    pointer-events: none;
}

.poster:nth-child(6):hover,
.poster-folder:hover {
    transform: rotate(-1deg) !important;
    z-index: 1 !important;
}

/* Work Item Flip Modal Overlay */
.work-flip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: none;
}

.work-flip-overlay.active {
    display: block;
}

/* Enlarged work item card with flip */
.work-item-enlarged {
    position: fixed;
    z-index: 9999;
    perspective: 1000px;
}

.work-item-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.work-item-card.flipped {
    transform: rotateY(180deg);
}

.work-item-front,
.work-item-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.work-item-front {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-item-front img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.work-item-back {
    background: linear-gradient(135deg, #b8a3b3 0%, #8a7589 100%);
    transform: rotateY(180deg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-y: auto;
}

.work-item-back h2 {
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.work-item-back p {
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #f0f0f0;
    max-width: 600px;
}

.work-close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.work-close-btn.active {
    display: flex;
}

.work-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.work-flip-instruction {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1rem;
    z-index: 10000;
    display: none;
    animation: pulse 2s infinite;
}

.work-flip-instruction.active {
    display: block;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Showreel Section */
.showreel {
    min-height: 100vh;
    background-image: url('assets/images/backgrounds/ShowreelBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 2rem;
    position: relative;
}

.showreel .section-title {
    position: relative;
    z-index: 10;
    margin-bottom: -1.5rem;
}


.showreel-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.showreel-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.showreel-video {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}


/* Education Section */
.education {
    min-height: 100vh;
    background-image: url('assets/images/backgrounds/EducationBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.education-liquid-bottom-left {
    position: absolute;
    bottom: 0;
    left: -20px;
    width: 280px;
    height: auto;
    z-index: 1;
    opacity: 0.85;
}

.education-title {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
}

.education-title img:first-child {
    margin-right: -0.5rem;
}

.education-title img:first-child {
    height: 200px;
}

.education-title img:not(:first-child) {
    margin-top: 80px;
}

.education-content {
    max-width: 1000px;
    margin: 0 auto 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.edu-item {
    background: transparent;
    padding: 0;
    text-align: center;
}

.edu-item.primary {
    background: transparent;
}

.edu-item h3 {
    color: #ffffff;
    font-family: 'TT Ramillas', Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.8;
}

.afda-logo {
    position: absolute;
    bottom: 4rem;
    right: 2rem;
    z-index: 2;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.afda-logo:active {
    cursor: grabbing;
}

.afda-logo img {
    width: 200px;
    height: auto;
    pointer-events: none;
}

/* Contact Section */
.contacts {
    min-height: 100vh;
    background-image: url('assets/images/backgrounds/ContactBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.contact-liquid-top-left {
    position: absolute;
    top: 0;
    left: -20px;
    width: 280px;
    height: auto;
    z-index: 1;
    opacity: 0.9;
}

.contact-liquid-bottom-right {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 280px;
    height: auto;
    z-index: 1;
    opacity: 0.9;
}

.contact-title-line1,
.contact-title-line2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.contacts .section-title {
    margin-bottom: 1.5rem;
}

.contact-info {
    text-align: center;
    background: transparent;
    padding: 0;
    position: relative;
    z-index: 2;
}

.contact-info p {
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.email {
    display: block;
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-bottom: 1.5rem;
}

.email:hover {
    color: #5ba3d0;
}

.cv-download {
    display: block;
    margin: 0 auto;
    width: fit-content;
    padding: 1rem 2.5rem;
    font-family: 'Agrandir', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    border: 2px solid #ffffff;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cv-download:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Touch-friendly improvements for all mobile/tablet devices */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .explore-btn,
    .poster,
    .clickable-work {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }

    /* Remove hover effects on touch devices */
    .nav-link:hover,
    .explore-btn:hover,
    .poster:hover,
    .clickable-work:hover {
        transform: none;
    }

    /* Better touch feedback */
    .nav-link:active,
    .explore-btn:active,
    .poster:active,
    .clickable-work:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Tablet layout adjustments */
    .navbar {
        padding: 1rem 1.5rem;
    }

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

    .nav-link {
        font-size: 0.95rem;
    }

    .nav-link-portfolio {
        font-size: 1.8rem;
    }

    /* About section tablet */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .about-title {
        align-items: center;
    }

    .about-title-line1,
    .about-title-line2 {
        justify-content: center;
    }

    .profile-image {
        max-width: 400px;
    }

    /* Skills section tablet */
    .skills-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 700px;
        margin: 4rem auto;
    }

    .software-icons-scattered {
        height: 400px;
        max-width: 800px;
    }

    .software-icons-scattered .icon-item img {
        width: 100px;
    }

    .skills-left .skills-category ul {
        column-count: 2;
    }

    /* Work section tablet */
    .work-layout {
        flex-direction: column;
        gap: 3rem;
    }

    .work .section-title {
        text-align: center;
        align-items: center;
        order: -1;
    }

    .work-gallery {
        min-height: auto;
        max-width: 600px;
        margin: 0 auto;
    }

    .poster-grid {
        width: 100%;
        max-width: 600px;
        height: auto;
        min-height: 700px;
    }

    .poster {
        width: 160px;
    }

    .poster:nth-child(1) {
        top: 0;
        left: 10px;
    }

    .poster:nth-child(2) {
        top: 20px;
        left: 200px;
    }

    .poster:nth-child(3) {
        top: 10px;
        right: 20px;
    }

    .poster:nth-child(4) {
        top: 220px;
        left: 0;
    }

    .poster:nth-child(5) {
        top: 200px;
        left: 180px;
    }

    .poster:nth-child(6) {
        top: 250px;
        right: 10px;
    }

    /* Education tablet */
    .education-content {
        max-width: 800px;
    }

    /* Contact tablet */
    .contact-info {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .nav-hamburger {
        display: flex;
    }

    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
        background: rgba(100, 96, 98, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        transition: right 0.4s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        border-radius: 0;
    }

    .nav-container.mobile-active {
        right: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-link-portfolio {
        font-size: 1.8rem;
        margin: 1rem 0;
    }

    /* Section spacing for mobile */
    .section-title img {
        height: 80px;
    }

    .work-title-line1 img,
    .work-title-line2 img {
        height: 80px;
    }

    .about-title img {
        height: 60px;
    }

    .hero-name img {
        height: 80px;
    }

    /* Hero section mobile */
    .hero {
        padding: 100px 1.5rem 3rem;
    }

    .hero-liquid-top-left,
    .hero-liquid-bottom-right {
        width: 200px;
        opacity: 0.6;
    }

    .film-strip {
        max-width: 100%;
    }

    .explore-btn {
        width: 120px;
    }

    /* About section mobile */
    .about {
        padding: 5rem 1.5rem;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Skills section mobile */
    .skills-part1,
    .skills-part2 {
        padding: 4rem 1.5rem;
    }

    .software-icons-scattered {
        height: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 2rem 0;
        max-width: 100%;
    }

    .software-icons-scattered .icon-item {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        text-align: center;
        margin: 0 auto;
    }

    .software-icons-scattered .icon-item img {
        width: 80px;
        height: auto;
    }

    .skills-left .skills-category ul {
        column-count: 1;
    }

    .skills-category li {
        font-size: 1rem;
    }

    .movie-slate,
    .movie-star,
    .movie-popcorn {
        width: 120px;
    }

    /* Decorative liquids smaller on mobile */
    .skills-liquid-bottom-left,
    .skills-liquid-page2-top-left,
    .skills-liquid-page2-bottom-middle,
    .skills-liquid-page2-bottom-right {
        width: 150px;
        opacity: 0.5;
    }

    /* Skills Sticky Note mobile - hide to prevent overlap */
    .skills-sticky-note {
        display: none;
    }

    /* Skills title mobile - ensure it wraps properly */
    .skills-title {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .skills-title img {
        height: 60px;
    }

    /* Work section mobile */
    .work {
        padding: 5rem 1.5rem;
    }

    .work-liquid-design {
        width: 150px;
        opacity: 0.3;
    }

    /* Work Sticky Note mobile - reposition */
    .work-sticky-note {
        width: 80px;
        bottom: auto;
        top: 2%;
        right: 2%;
    }

    /* Work title mobile */
    .work-title-line1,
    .work-title-line2 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
    }

    .work-title-line1 img,
    .work-title-line2 img {
        height: 60px;
    }

    .work-gallery {
        min-height: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .work-section {
        position: relative !important;
    }

    .burn-mouth {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin: 0 auto 2rem;
        width: 100%;
        max-width: 280px;
    }

    /* Polaroid group mobile - simplified layout */
    .polaroid-group {
        height: auto;
        min-height: 200px;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
    }

    .folder-image {
        position: relative !important;
        width: 220px !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 auto;
    }

    .main-poster-image {
        position: absolute !important;
        width: 70px !important;
        top: 15px !important;
        left: 25px !important;
        transform: rotate(-5deg) !important;
    }

    /* Hide polaroids on mobile - too cluttered */
    .polaroid-top-top-right,
    .polaroid-top-bottom-right,
    .polaroid-bottom-left,
    .polaroid-bottom-top-right,
    .polaroid-bottom-bottom-right {
        display: none;
    }

    .posters {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .poster-grid {
        width: 100%;
        height: auto;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .poster {
        position: relative !important;
        width: 180px !important;
        margin: 0 auto;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        display: block;
    }

    .poster-folder {
        display: none;
    }

    .work-poster-decor {
        display: none;
    }

    /* Showreel mobile */
    .showreel {
        padding: 5rem 1rem;
        overflow-x: hidden;
    }

    .showreel-title {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
    }

    .showreel-title img {
        height: 50px;
    }

    .showreel-container {
        max-width: 100%;
    }

    /* Education mobile */
    .education {
        padding: 5rem 1rem;
        overflow-x: hidden;
    }

    .education-title {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .education-title img {
        height: 45px !important;
        margin-top: 0 !important;
    }

    .education-title img:first-child {
        height: 45px !important;
        margin-right: 0 !important;
    }

    .edu-item h3 {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .education-content {
        padding: 0 0.5rem;
    }

    .afda-logo {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 2rem auto 0;
        text-align: center;
    }

    .afda-logo img {
        width: 150px;
    }

    .education-liquid-bottom-left {
        width: 150px;
        opacity: 0.5;
    }

    /* Contact mobile */
    .contacts {
        padding: 5rem 1rem;
        overflow-x: hidden;
    }

    .contact-title-line1,
    .contact-title-line2 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
    }

    .contact-title-line1 img,
    .contact-title-line2 img {
        height: 60px;
    }

    .contact-liquid-top-left,
    .contact-liquid-bottom-right {
        width: 120px;
        opacity: 0.5;
    }

    .contact-info p {
        font-size: 1.1rem;
    }

    .email {
        font-size: 1.2rem;
        word-break: break-word;
    }

    .cv-download {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }

    /* Work flip modal mobile */
    .work-item-back {
        padding: 2rem 1.5rem;
    }

    .work-item-back h2 {
        font-size: 1.8rem;
    }

    .work-item-back p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    .navbar {
        padding: 0.8rem 1rem;
    }

    .nav-hamburger {
        right: 1rem;
        width: 26px;
        height: 20px;
    }

    .nav-hamburger span {
        height: 2.5px;
    }

    .nav-container {
        width: 90vw;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }

    .nav-link-portfolio {
        font-size: 1.5rem;
        margin: 0.5rem 0;
    }

    /* Hero section extra small */
    .hero {
        padding: 90px 1rem 2rem;
    }

    .section-title img {
        height: 50px;
    }

    .work-title-line1 img,
    .work-title-line2 img {
        height: 50px;
    }

    .hero-name img {
        height: 50px;
    }

    .hero-name-line1,
    .hero-name-line2 {
        gap: 0.2rem;
    }

    .hero-liquid-top-left,
    .hero-liquid-bottom-right {
        width: 150px;
        opacity: 0.4;
    }

    .explore-btn {
        width: 100px;
    }

    /* About section extra small */
    .about {
        padding: 4rem 1rem;
    }

    .about-title img {
        height: 50px;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    /* Skills section extra small */
    .skills-part1,
    .skills-part2 {
        padding: 3rem 1rem;
    }

    .software-icons-scattered {
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .software-icons-scattered .icon-item img {
        width: 70px;
    }

    .skills-category h3 {
        font-size: 1.2rem;
    }

    .skills-category li {
        font-size: 0.95rem;
        padding-left: 1.5rem;
    }

    .movie-slate,
    .movie-star,
    .movie-popcorn {
        width: 100px;
    }

    /* Skills title extra small */
    .skills-title img {
        height: 50px;
    }

    /* Work section extra small */
    .work {
        padding: 4rem 1rem;
    }

    /* Work Sticky Note extra small */
    .work-sticky-note {
        width: 70px;
        top: 1%;
    }

    .work-layout {
        gap: 1.5rem;
    }

    .work-title-line1 img,
    .work-title-line2 img {
        height: 50px;
    }

    .burn-mouth {
        max-width: 240px;
    }

    .folder-image {
        width: 180px !important;
    }

    .main-poster-image {
        width: 55px !important;
        top: 12px !important;
        left: 20px !important;
    }

    .posters {
        max-width: 260px;
    }

    .poster {
        width: 150px !important;
    }

    /* Showreel extra small */
    .showreel {
        padding: 4rem 1rem;
    }

    .showreel-title img {
        height: 40px;
    }

    .showreel-video {
        border-radius: 10px;
    }

    /* Education extra small */
    .education {
        padding: 4rem 0.5rem;
    }

    .education-title img {
        height: 35px !important;
    }

    .education-title img:first-child {
        height: 120px;
    }

    .education-title img:not(:first-child) {
        margin-top: 50px;
    }

    .edu-item h3 {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .afda-logo img {
        width: 130px;
    }

    /* Contact extra small */
    .contacts {
        padding: 4rem 1rem;
    }

    .contact-info p {
        font-size: 1.1rem;
    }

    .email {
        font-size: 1.2rem;
    }

    .cv-download {
        font-size: 0.9rem;
        padding: 0.7rem 1.5rem;
    }

    /* Work flip modal extra small */
    .work-item-back {
        padding: 1.5rem 1rem;
    }

    .work-item-back h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .work-item-back p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .work-close-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .work-flip-instruction {
        bottom: 1rem;
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Landscape mode on mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .hero {
        min-height: auto;
        padding: 80px 1rem 2rem;
    }

    .hero-name img {
        height: 50px;
    }

    .section-title img {
        height: 60px;
    }

    .nav-container.mobile-active {
        width: 250px;
        padding: 1.5rem;
        overflow-y: auto;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .nav-link-portfolio {
        font-size: 1.4rem;
        margin: 0.5rem 0;
    }
}

/* Very small screens (e.g., iPhone SE, older phones) */
@media (max-width: 375px) {
    .hero-name img {
        height: 45px;
    }

    .section-title img {
        height: 45px;
    }

    .work-title-line1 img,
    .work-title-line2 img {
        height: 45px;
    }

    .about-title img {
        height: 45px;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    .skills-category li {
        font-size: 0.9rem;
    }

    .email {
        font-size: 1.1rem;
    }
}

/* Prevent horizontal scroll on all mobile devices */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    section {
        overflow-x: hidden;
    }

    .hero,
    .about,
    .skills,
    .work,
    .showreel,
    .education,
    .contacts {
        overflow-x: hidden;
    }
}
