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

:root {
  --primary-dark: #2C3E50;
  --primary-teal: #34495E;
  --accent-teal: #5A9B8E;
   --accent-coral: #E8A298;
  --background-dark: #1A1A1A;
  --card-background: #2C2C2C;

  --teal-glow: #5A9B8E;
    --coral-glow: #E8A298;
    --teal-bright: #7BC4B8;
    --coral-bright: #F4B5A8;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #E8E8E8;
    background-color: #1A1A1A;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #1A1A1A;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    background: linear-gradient(45deg, #5A9B8E, #E8A298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #E8A298;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

main {
    margin-top: 70px;
}

/* Hero Section */
#home {
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 30% 30%, #00bfa6, #004d40);
    opacity: 0.35;
    border-radius: 33% 67% 67% 33% / 33% 33% 67% 67%;
    animation: blobMove 5s infinite ease-in-out alternate;
    filter: blur(100px);
    top: 20%;
    left: 10%;
}

.blob2 {
    background: radial-gradient(circle at 70% 70%, #ff4081, #880e4f);
    top: 60%;
    left: 60%;
    animation-delay: 4s;
}

.blob3 {
    background: radial-gradient(circle at 50% 50%, #448aff, #0d47a1);
    top: 40%;
    left: 80%;
    animation-delay: 8s;
}

@keyframes blobMove {
    0% {
        transform: translate(0, 0) scale(1);
        border-radius: 42% 58% 33% 67% / 44% 66% 34% 56%;
    }
    25% {
        transform: translate(60px, -40px) scale(1.1);
        border-radius: 58% 42% 57% 43% / 39% 61% 59% 41%;
    }
    50% {
        transform: translate(-40px, 20px) scale(1.2);
        border-radius: 33% 67% 68% 32% / 38% 62% 60% 40%;
    }
    75% {
        transform: translate(30px, 30px) scale(0.95);
        border-radius: 60% 40% 40% 60% / 45% 55% 65% 35%;
    }
    100% {
        transform: translate(0, 0) scale(1);
        border-radius: 42% 58% 33% 67% / 44% 66% 34% 56%;
    }
}

.home-greeting {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 10px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.home-name {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00bfa6, #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.home-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #E8E8E8;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.home-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.home-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 1s both;
}

.tech-badge {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.home-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 1.2s both;
}

.cta-button {
    background: linear-gradient(45deg, #00695C, #004d40);
    color: white;
    border: none;
    padding: 8px 32px;
    font-size: 1.1rem;
    font-weight: 525;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 105, 92, 0.4);
}

/* About Section */
#about {
    background: #2C2C2C;
    min-height: 100vh;
    display: flex;
    align-items: center; 
    justify-content: center;
    padding: 2rem;
}

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

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 300px;
}

.about-image img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.accent-text {
    color: #E8A298;
    font-weight: bold;
}

/* Projects Section */
#projects {
    background: #1A1A1A;
    padding: 4rem 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, 
        var(--primary-teal) 0%, 
        var(--teal-bright) 35%, 
        var(--accent-coral) 65%, 
        var(--coral-bright) 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: yourColorFlow 6s ease-in-out infinite;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(90, 155, 142, 0.3));
}

@supports not (-webkit-background-clip: text) {
    .section-title {
        background: none;
        color: var(--primary-teal);
        -webkit-text-fill-color: unset;
    }
}

@keyframes yourColorFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.override-margin {
  margin-bottom: 2rem !important;
}

.project-item {
    background: rgba(44, 44, 44, 0.8);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: center;
    padding: 2rem 2rem;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.8s ease;
    pointer-events: none;
}

.project-item:hover::before {
    left: 100%;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(90, 155, 142, 0.1);
}

.project-item:nth-child(even) {
    grid-template-columns: 300px 1fr;
}

.project-item:nth-child(even) .project-info {
    order: 2;
}

.project-item:nth-child(even) .project-image {
    order: 1;
}

/* Interactive Screenshot Gallery */
.screenshot-gallery {
    position: relative;
    width: 280px;
    height: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    perspective-origin: center center;
}

.phone-container {
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
    border-radius: 32px;
}

.screen {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;   
}

.screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: translateX(100%) rotateY(15deg) scale(0.9);
    transition: none;
    filter: blur(1px) brightness(0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform-origin: center center;
    backface-visibility: hidden;
    /* GPU acceleration for smoother animations */
    will-change: transform, opacity, filter;
    transform-style: preserve-3d;
}

.screenshot-gallery.android {
    width: 280px !important;
    height: 580px !important;
}

.screenshot-gallery.android .screen {
    border-radius: 28px;
}

.screenshot-gallery.android .screenshot {
    object-fit: contain !important;
}

.screenshot.active {
    opacity: 1;
    transform: translateX(0) rotateY(0deg) scale(1);
    filter: blur(0px) brightness(1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    z-index: 5;
    transition: all 1.0s cubic-bezier(0.23, 1, 0.32, 1);
}

.screenshot.holo-exit-right {
    animation: dramaticHoloExitRight 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.screenshot.holo-enter-left {
    animation: dramaticHoloEnterLeft 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Left Direction: Current flies left, new comes from right */
.screenshot.holo-exit-left {
    animation: dramaticHoloExitLeft 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.screenshot.holo-enter-right {
    animation: dramaticHoloEnterRight 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* DRAMATIC EXIT RIGHT */
@keyframes dramaticHoloExitRight {
    0% {
        transform: translateX(0) rotateY(0deg) scale(1) rotateZ(0deg);
        opacity: 1;
        filter: blur(0px) brightness(1) hue-rotate(0deg) saturate(1);
    }
    10% {
        transform: translateX(5%) rotateY(3deg) scale(1.02) rotateZ(1deg);
        opacity: 1;
        filter: blur(0px) brightness(1.05) hue-rotate(5deg) saturate(1.1);
    }
    25% {
        transform: translateX(20%) rotateY(12deg) scale(0.95) rotateZ(5deg);
        opacity: 0.9;
        filter: blur(0.5px) brightness(1.2) hue-rotate(25deg) saturate(1.3);
    }
    45% {
        transform: translateX(50%) rotateY(30deg) scale(0.75) rotateZ(12deg);
        opacity: 0.7;
        filter: blur(1.5px) brightness(1.5) hue-rotate(60deg) saturate(1.7);
    }
    65% {
        transform: translateX(85%) rotateY(50deg) scale(0.45) rotateZ(20deg);
        opacity: 0.4;
        filter: blur(3px) brightness(1.9) hue-rotate(120deg) saturate(2.2);
    }
    80% {
        transform: translateX(115%) rotateY(70deg) scale(0.2) rotateZ(30deg);
        opacity: 0.15;
        filter: blur(5px) brightness(2.3) hue-rotate(180deg) saturate(2.8);
    }
    95% {
        transform: translateX(140%) rotateY(85deg) scale(0.05) rotateZ(40deg);
        opacity: 0.05;
        filter: blur(8px) brightness(2.7) hue-rotate(240deg) saturate(3.2);
    }
    100% {
        transform: translateX(150%) rotateY(90deg) scale(0.01) rotateZ(45deg);
        opacity: 0;
        filter: blur(10px) brightness(3) hue-rotate(280deg) saturate(3.5);
    }
}

/* DRAMATIC ENTER FROM LEFT */  
@keyframes dramaticHoloEnterLeft {
    0% {
        transform: translateX(-150%) rotateY(-90deg) scale(0.01) rotateZ(-45deg);
        opacity: 0;
        filter: blur(10px) brightness(3) hue-rotate(280deg) saturate(3.5);
    }
    5% {
        transform: translateX(-140%) rotateY(-85deg) scale(0.05) rotateZ(-40deg);
        opacity: 0.05;
        filter: blur(8px) brightness(2.7) hue-rotate(240deg) saturate(3.2);
    }
    20% {
        transform: translateX(-115%) rotateY(-70deg) scale(0.2) rotateZ(-30deg);
        opacity: 0.15;
        filter: blur(5px) brightness(2.3) hue-rotate(180deg) saturate(2.8);
    }
    35% {
        transform: translateX(-85%) rotateY(-50deg) scale(0.45) rotateZ(-20deg);
        opacity: 0.4;
        filter: blur(3px) brightness(1.9) hue-rotate(120deg) saturate(2.2);
    }
    55% {
        transform: translateX(-50%) rotateY(-30deg) scale(0.75) rotateZ(-12deg);
        opacity: 0.7;
        filter: blur(1.5px) brightness(1.5) hue-rotate(60deg) saturate(1.7);
    }
    75% {
        transform: translateX(-20%) rotateY(-12deg) scale(0.95) rotateZ(-5deg);
        opacity: 0.9;
        filter: blur(0.5px) brightness(1.2) hue-rotate(25deg) saturate(1.3);
    }
    90% {
        transform: translateX(-5%) rotateY(-3deg) scale(1.02) rotateZ(-1deg);
        opacity: 1;
        filter: blur(0px) brightness(1.05) hue-rotate(5deg) saturate(1.1);
    }
    100% {
        transform: translateX(0) rotateY(0deg) scale(1) rotateZ(0deg);
        opacity: 1;
        filter: blur(0px) brightness(1) hue-rotate(0deg) saturate(1);
    }
}

/* DRAMATIC EXIT LEFT */
@keyframes dramaticHoloExitLeft {
    0% {
        transform: translateX(0) rotateY(0deg) scale(1) rotateZ(0deg);
        opacity: 1;
        filter: blur(0px) brightness(1) hue-rotate(0deg) saturate(1);
    }
    10% {
        transform: translateX(-5%) rotateY(-3deg) scale(1.02) rotateZ(-1deg);
        opacity: 1;
        filter: blur(0px) brightness(1.05) hue-rotate(5deg) saturate(1.1);
    }
    25% {
        transform: translateX(-20%) rotateY(-12deg) scale(0.95) rotateZ(-5deg);
        opacity: 0.9;
        filter: blur(0.5px) brightness(1.2) hue-rotate(25deg) saturate(1.3);
    }
    45% {
        transform: translateX(-50%) rotateY(-30deg) scale(0.75) rotateZ(-12deg);
        opacity: 0.7;
        filter: blur(1.5px) brightness(1.5) hue-rotate(60deg) saturate(1.7);
    }
    65% {
        transform: translateX(-85%) rotateY(-50deg) scale(0.45) rotateZ(-20deg);
        opacity: 0.4;
        filter: blur(3px) brightness(1.9) hue-rotate(120deg) saturate(2.2);
    }
    80% {
        transform: translateX(-115%) rotateY(-70deg) scale(0.2) rotateZ(-30deg);
        opacity: 0.15;
        filter: blur(5px) brightness(2.3) hue-rotate(180deg) saturate(2.8);
    }
    95% {
        transform: translateX(-140%) rotateY(-85deg) scale(0.05) rotateZ(-40deg);
        opacity: 0.05;
        filter: blur(8px) brightness(2.7) hue-rotate(240deg) saturate(3.2);
    }
    100% {
        transform: translateX(-150%) rotateY(-90deg) scale(0.01) rotateZ(-45deg);
        opacity: 0;
        filter: blur(10px) brightness(3) hue-rotate(280deg) saturate(3.5);
    }
}

/* DRAMATIC ENTER FROM RIGHT */
@keyframes dramaticHoloEnterRight {
    0% {
        transform: translateX(150%) rotateY(90deg) scale(0.01) rotateZ(45deg);
        opacity: 0;
        filter: blur(10px) brightness(3) hue-rotate(280deg) saturate(3.5);
    }
    5% {
        transform: translateX(140%) rotateY(85deg) scale(0.05) rotateZ(40deg);
        opacity: 0.05;
        filter: blur(8px) brightness(2.7) hue-rotate(240deg) saturate(3.2);
    }
    20% {
        transform: translateX(115%) rotateY(70deg) scale(0.2) rotateZ(30deg);
        opacity: 0.15;
        filter: blur(5px) brightness(2.3) hue-rotate(180deg) saturate(2.8);
    }
    35% {
        transform: translateX(85%) rotateY(50deg) scale(0.45) rotateZ(20deg);
        opacity: 0.4;
        filter: blur(3px) brightness(1.9) hue-rotate(120deg) saturate(2.2);
    }
    55% {
        transform: translateX(50%) rotateY(30deg) scale(0.75) rotateZ(12deg);
        opacity: 0.7;
        filter: blur(1.5px) brightness(1.5) hue-rotate(60deg) saturate(1.7);
    }
    75% {
        transform: translateX(20%) rotateY(12deg) scale(0.95) rotateZ(5deg);
        opacity: 0.9;
        filter: blur(0.5px) brightness(1.2) hue-rotate(25deg) saturate(1.3);
    }
    90% {
        transform: translateX(5%) rotateY(3deg) scale(1.02) rotateZ(1deg);
        opacity: 1;
        filter: blur(0px) brightness(1.05) hue-rotate(5deg) saturate(1.1);
    }
    100% {
        transform: translateX(0) rotateY(0deg) scale(1) rotateZ(0deg);
        opacity: 1;
        filter: blur(0px) brightness(1) hue-rotate(0deg) saturate(1);
    }
}

/* Gallery Controls */
.gallery-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% - 60px);
    left: 15px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.gallery-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(20, 20, 20, 0.9));
    border: 2px solid rgba(90, 155, 142, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: auto;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: scale(0.8);
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    /* Optimize for smooth interactions */
    will-change: transform, opacity;
}

.gallery-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(90, 155, 142, 0.1), rgba(232, 162, 152, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.screenshot-gallery:hover .gallery-arrow {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(90, 155, 142, 0.6);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.gallery-arrow:hover {
    background: linear-gradient(135deg, rgba(90, 155, 142, 0.9), rgba(232, 162, 152, 0.8));
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(90, 155, 142, 0.4);
    border-color: rgba(90, 155, 142, 1);
}

.gallery-arrow:hover::before {
    opacity: 1;
}

.gallery-arrow:active {
    transform: scale(1.05);
    transition: transform 0.1s ease;
}

/* Subtle screen glow during transitions */
.screen.transitioning {
    box-shadow: 
        0 0 40px rgba(90, 155, 142, 0.3),
        inset 0 0 40px rgba(90, 155, 142, 0.08);
    transition: box-shadow 0.6s ease;
}

/* Performance optimizations */
.screenshot-gallery * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Preload optimization for smoother transitions */
.screenshot-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    transform: translateZ(0); /* Force GPU layer */
}

/* Mode-specific background effects */
.screenshot-gallery.holo-mode .screen {
    background: radial-gradient(circle at center, rgba(90, 155, 142, 0.04), transparent);
}

/* Floating animation for the gallery container */
.floating-gentle {
    animation: gentleFloat 10s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px) rotateZ(0deg); 
    }
    25% { 
        transform: translateY(-4px) rotateZ(0.5deg); 
    }
    50% { 
        transform: translateY(-8px) rotateZ(0deg); 
    }
    75% { 
        transform: translateY(-4px) rotateZ(-0.5deg); 
    }
}

.project-info h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-info p {
    margin-bottom: 1.5rem;
    color: #E8E8E8;
    font-size: 1.1rem;
    line-height: 1.6;
}

.project-info-catch {
    background: linear-gradient(45deg, #2a7ae2, #4a9eff, #1a5bb8, #3d8bff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: modernPulse 3.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(42, 122, 226, 0.3));
}

@keyframes modernPulse {
    0%, 100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 8px rgba(42, 122, 226, 0.3));
    }
    25% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 15px rgba(42, 122, 226, 0.5));
    }
    50% {
        background-position: 100% 100%;
        filter: drop-shadow(0 0 20px rgba(42, 122, 226, 0.7));
    }
    75% {
        background-position: 0% 100%;
        filter: drop-shadow(0 0 12px rgba(42, 122, 226, 0.4));
    }
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #5A9B8E 0%, #7BC4B8 50%, #E8A298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    position: relative;
    animation: enhancedAttention 2.5s ease-in-out infinite;
    padding: 8px 0;
}

@keyframes enhancedAttention {
    0%, 100% {
        transform: scale(1) translateY(0);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.08) translateY(-2px);
        filter: brightness(1.2);
    }
}

.read-more::before {
    content: '→';
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #5A9B8E, #E8A298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: arrowBounce 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.read-more::after {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235A9B8E' viewBox='0 0 24 24'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 2px 6px rgba(90, 155, 142, 0.3));
    animation: lockGlow 3s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(0px);
    }
    50% {
        transform: translateX(8px);
    }
}

@keyframes lockGlow {
    0%, 100% {
        filter: drop-shadow(0 2px 6px rgba(90, 155, 142, 0.3));
    }
    50% {
        filter: drop-shadow(0 3px 12px rgba(90, 155, 142, 0.6));
    }
}

.read-more:hover {
    transform: scale(1.1) translateY(-3px);
    animation-play-state: paused;
}

.read-more:hover::before {
    transform: translateX(10px) scale(1.2);
    animation-play-state: paused;
}

.read-more:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23E8A298' viewBox='0 0 24 24'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h2c0-1.66 1.34-3 3-3s3 1.34 3 3v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
    transform: scale(1.2) rotate(12deg);
    filter: drop-shadow(0 4px 16px rgba(232, 162, 152, 0.5));
    animation-play-state: paused;
}

.project-tags {
    margin-bottom: 1.5rem;
}

.project-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.phone-flip-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phone-flip-container.flipped {
    transform: rotateY(180deg);
}

/* Enhanced floating animation */
.floating {
    animation: enhancedFloat 6s ease-in-out infinite;
}

@keyframes enhancedFloat {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg);
    }
    25% {
        transform: translateY(-15px) rotateX(1deg);
    }
    50% {
        transform: translateY(-25px) rotateX(0deg);
    }
    75% {
        transform: translateY(-10px) rotateX(-1deg);
    }
}

/* Stagger animations for multiple projects */
.project-item:nth-child(1) .floating {
    animation-delay: 0s;
}

.project-item:nth-child(2) .floating {
    animation-delay: -2s;
}

.project-item:nth-child(3) .floating {
    animation-delay: -4s;
}

.project-item:nth-child(4) .floating {
    animation-delay: -6s;
}

.project-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

.project-image img {
    width: 250px;
    height: 485px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.project-tag {
    background: #E8A298;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.btn-primary {
    background: #2a7ae2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary:hover {
    background: #1a5bb8;
    transform: translateY(-1px);
}

.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
    transition: opacity 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    opacity: 1;
}

.modal.closing {
    opacity: 0;
}

@keyframes flipIn {
    from {
        transform: rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

@keyframes flipOut {
    from {
        transform: rotateY(0deg);
        opacity: 1;
    }
    to {
        transform: rotateY(-90deg);
        opacity: 0;
    }
}

.modal.closing .modal-content {
    animation: flipOut 0.6s ease-out;
}

.modal-content {
    background: #1f1f1f;
    color: #f3f3f3;
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transform-style: preserve-3d;
    animation: flipIn 0.6s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #5A9B8E;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.modal-title {
    font-size: 2rem;
    color: #5A9B8E;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #E8E8E8;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-btn:hover {
    color: #E8A298;
}

.tab-navigation {
    display: flex;
    background-color: #333;
    border-bottom: 1px solid #444;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 15px 20px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
}

.tab-btn:hover {
    color: #ffffff;
    background-color: #404040;
}

.tab-btn.active {
    color: #E8A298;
    border-bottom-color: #E8A298;
    background-color: #404040;
}

.tab-content {
    padding: 30px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 1.1rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-panel li {
    margin-bottom: 15px;
    padding-left: 0;
    line-height: 1.6;
}

.tab-panel li strong {
    color: #5fb3a3;
}

.tab-panel p {
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
#contact {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h2 {
    font-size: 2.5rem;
    color: #5A9B8E;
    margin-bottom: 2rem;
}

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

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

.contact-method {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    z-index: 10;
}

.contact-method:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(90, 155, 142, 0.2);
}

.contact-method h3 {
    color: #5A9B8E;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-method p {
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.8;
}

.contact-info {
    color: #E8A298;
    font-weight: 500;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #E8E8E8;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    z-index: 10;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 155, 142, 0.2);
}

.divider {
    text-align: center;
    margin: 3rem 0;
    position: relative;
    z-index: 10;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.divider span {
    background: #2C2C2C;
    padding: 0 2rem;
    color: white;
    font-weight: 500;
}

/* Contact Form Styles */
.contact-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: none;
    position: relative;
    z-index: 20;
}

.contact-form.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    color: #5A9B8E;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
    z-index: 20;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #5A9B8E;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #E8E8E8;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    position: relative;
    z-index: 20;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5A9B8E;
    box-shadow: 0 0 0 2px rgba(90, 155, 142, 0.2);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 20;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 20;
}

.submit-btn {
    background: linear-gradient(45deg, #5A9B8E, #E8A298);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 155, 142, 0.4);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #E8E8E8;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.accent-text {
    color: #E8A298;
    font-weight: bold;
}

section {
    padding: 4rem 0;
    min-height: 400px;
}

h1, h2 {
    margin-bottom: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(320px, 80vw);
        background: rgba(44, 44, 44, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        gap: 0;
        padding: 2rem 1rem;
        transform: translateX(100%);
        opacity: 1;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }
    .nav-links li {
        padding: 0.5rem 0;
    }

    /* Adjust main margin for smaller header */
    main {
        margin-top: 60px;
    }

    /* Hero Section Mobile Typography */
    .home-name {
        font-size: 2.5rem;
    }

    .home-title {
        font-size: 1.4rem;
    }

    .section-title {
        display: flex;
        align-self: center;
        justify-content: center;
    }
    
    .home-description {
        font-size: 1rem;
    }

    .tech-stack {
        gap: 8px;
    }
    
    .tech-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .home-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button, .cta-secondary {
        width: 100%;
        max-width: 180px;
        padding: 4px 16px;
        font-size: 1rem;
    }
            
    /* About Section Mobile Typography */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-text h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .about-text p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }

    .about-image {
        padding: 1rem;
        min-height: 280px;
    }
    
    .about-image img {
        width: min(280px, 70vw);
        height: min(280px, 70vw);
        max-width: 280px;
        max-height: 280px;
    }

    /* Projects Section Mobile Typography */
    .projects-content h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-item,
    .project-item:nth-child(even) {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .project-item:nth-child(even) .project-info,
    .project-item:nth-child(even) .project-image {
        order: unset;
    }

    .project-actions {
        display: flex;
        gap: 0.8rem;
        flex-wrap: wrap;
        margin-top: 1.5rem;
        justify-content: center;
    }

    .screenshot-gallery {
        width: 200px;
        height: 400px;
        margin: 0 auto;
        /* Keep the original flex properties from desktop */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .screenshot-gallery.android {
        width: 220px !important;
        height: 460px !important;
    }

    .screenshot-gallery .screenshot {
        /* Keep original desktop styles - don't override */
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important; /* Changed from cover to contain for mobile */
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .gallery-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .gallery-arrows {
        width: calc(100% - 60px);
        left: 30px;
    }
    
    .gallery-controls {
        bottom: 12px;
    }

    .phone-container {
        position: relative;
        width: 100%;
        height: calc(100% - 60px); /* Keep original calculation */
        border-radius: 32px;
    }

    .screen {
        width: 100%;
        height: 100%;
        border-radius: 24px;
        overflow: hidden;
        position: relative;   
    }

    .project-image {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0 1rem;
    }

    /* Fixed project image sizing */
    .project-image > img, 
    .project-image img {
        width: min(200px, 60vw);
        height: auto;
        max-width: 200px;
        max-height: 380px;
        object-fit: contain;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        display: block;
        margin: 0 auto;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 0 auto;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .tab-content {
        padding: 20px;
        font-size: 1rem;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 15px 20px;
        font-size: 16px;
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }
    
    .tab-btn.active {
        border-left-color: #5fb3a3;
        border-bottom-color: transparent;
    }

    /* Contact Section Mobile Typography */
    .contact-content h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .contact-methods {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        padding: 12px 25px;
        font-size: 1rem;
    } 

    /* Extra small screens (phones in portrait) */
    @media (max-width: 480px) {
        .container {
            padding: 0 10px;
        }
        
        .logo {
            font-size: 1.2rem;
        }
        
        .home-name {
            font-size: 2rem;
        }
        
        .tech-stack {
            justify-content: center;
        }
        
        .about-text h2,
        .projects-content h2,
        .contact-content h2 {
            font-size: 1.8rem;
        }

        .about-image {
            padding: 0.5rem;
            min-height: 250px;
        }
        
        .about-image img {
            width: min(240px, 80vw);
            height: min(240px, 80vw);
            max-width: 240px;
            max-height: 240px;
        }
        
        .screenshot-gallery {
            width: 180px;
            height: 3600px;
        }

        .screenshot-gallery.android {
            width: 200px !important;
            height: 420px !important;
        }

        .gallery-arrows {
            width: calc(100% - 40px);
            left: 20px;
        }

        .project-item {
            padding: 1rem;
            gap: 1.5rem;
        }
        
        .project-info h3 {
            font-size: 1.5rem;
        }

        .project-image {
            padding: 0 0.5rem;
        }

        .project-image > img, 
        .project-image img {
            width: min(160px, 55vw);
            max-width: 160px;
            max-height: 300px;
        }

        .projects-grid {
            gap: 3rem;
        }
        
        .project-tag {
            font-size: 0.8rem;
            padding: 0.2rem 0.6rem;
            margin-bottom: 0.5rem;
            display: inline-block;
        }

        .tab-btn {
            padding: 12px 15px;
            font-size: 1rem;
        }

        .tab-content {
            font-size: 0.9rem;
        }
    }
}