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

/* Loader Styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.pixel-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 60px;
    height: 60px;
}

.pixel {
    width: 16px;
    height: 16px;
    background: #333;
    animation: pixelPulse 1.5s infinite ease-in-out;
}

.pixel:nth-child(1) { animation-delay: 0s; }
.pixel:nth-child(2) { animation-delay: 0.1s; }
.pixel:nth-child(3) { animation-delay: 0.2s; }
.pixel:nth-child(4) { animation-delay: 0.3s; }
.pixel:nth-child(5) { animation-delay: 0.4s; }
.pixel:nth-child(6) { animation-delay: 0.5s; }
.pixel:nth-child(7) { animation-delay: 0.6s; }
.pixel:nth-child(8) { animation-delay: 0.7s; }
.pixel:nth-child(9) { animation-delay: 0.8s; }

@keyframes pixelPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.loader-text {
    font-family: 'Inclusive Sans', Arial, sans-serif;
    font-size: 48px;
    font-weight: 400;
    color: #333;
    position: absolute;
    white-space: nowrap;
    animation: textSlideIn 0.8s ease-out;
}

@keyframes textSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.loader-text.moving {
    animation: moveToNav 1s ease-in-out forwards;
}

@keyframes moveToNav {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(calc(-50vw + 120px), calc(-50vh + 40px)) scale(0.375);
    }
}

html {
    overflow-x: hidden;
}

/* Feature Notification */
.feature-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(51, 51, 51, 0.9);
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
    z-index: 1000;
    text-align: center;
    max-width: 90%;
    width: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.feature-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.feature-notification.hiding {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

body {
    font-family: 'Inclusive Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #333;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.nav-left {
    flex: 0 0 auto;
    max-width: 30%;
    overflow: hidden;
}

.nav-left h1 {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin: 0;
}

.nav-left h1:hover {
    opacity: 0.7;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 40%;
    overflow: hidden;
}

.nav-center h2 {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #666;
    margin: 0;
    white-space: nowrap;
}

.nav-right {
    flex: 0 0 auto;
    max-width: 30%;
    overflow: hidden;
}

.language-toggle {
    background: none;
    border: 1px solid #333;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 12px;
    min-width: 40px;
    text-align: center;
}

.language-toggle:hover {
    background: #333;
    color: #fff;
}

/* Easter Egg Photo */
.easter-egg-photo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 16, 16, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 60%;
    max-height: 60%;
    animation: scaleIn 0.3s ease-out;
}

.photo-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%) contrast(1.2) brightness(0.9);
}

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

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 16, 16, 0.8);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 40px;
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 90%;
    border: 1px solid #ddd;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 400;
    color: #333;
}

.email-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
}

.email-text {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.email-text:hover {
    color: #666;
}

.copy-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.copy-btn:hover {
    background: #555;
}

.copy-message {
    margin: 0;
    font-size: 14px;
    color: #28a745;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Main Content */
main {
    margin-top: 80px;
    padding: 0 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-x: hidden;
}

/* Three-column layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    height: 100%;
    align-items: center;
    padding: 40px 0;
}

/* About Section */
.about-section {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Main content sections animation */
.main-content section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.main-content.animate .featured-project {
    animation: slideUpFade 0.8s ease-out forwards;
    animation-delay: 0s;
}

.main-content.animate .about-section {
    animation: slideUpFade 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

.main-content.animate .certificates-section {
    animation: slideUpFade 0.8s ease-out forwards;
    animation-delay: 0.6s;
}

/* About section paragraph animations */
.about-content p {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-content.animate p {
    animation: slideUpFade 0.8s ease-out forwards;
}

.about-content.animate p:nth-child(2) {
    animation-delay: 0.2s;
}

.about-content.animate p:nth-child(3) {
    animation-delay: 0.4s;
}

.about-content.animate p:nth-child(4) {
    animation-delay: 0.6s;
}

.about-content.animate p:nth-child(5) {
    animation-delay: 0.8s;
}

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



.about-content {
    max-width: 100%;
}

.about-content h3 {
    font-size: 18px;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.about-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 16px;
    font-weight: 300;
}

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

/* Certificates Section */
.certificates-section {
    display: flex;
    align-items: center;
    height: 100%;
}

.certificates-content {
    max-width: 100%;
    text-align: left;
    width: 100%;
}

.certificates-content h3 {
    font-size: 18px;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-align: left;
}

.certificate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.certificate-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.cert-name {
    font-size: 14px;
    color: #333;
    font-weight: 400;
    text-align: left;
}

.cert-year {
    font-size: 12px;
    color: #999;
    font-weight: 300;
    text-align: left;
}

/* Featured Project */
.featured-project {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.project-container {
    width: 100%;
    min-width: 700px;
    max-width: 800px;
    margin: 0 auto;
}

.project-frame {
    background: #101010;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(16, 16, 16, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
}

.project-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    pointer-events: none;
}

.project-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4/3;
    max-height: calc(50vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    overflow: hidden;
    transition: filter 0.5s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%);
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.project-content:hover {
    filter: grayscale(0%);
    cursor: pointer;
}

.project-content.loading {
    filter: grayscale(100%) contrast(1.1) blur(2px);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transform: scale(1.02);
    transition: all 0.3s ease;
}



.project-title {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.project-title h1 {
    font-size: 3.5rem;
    font-weight: 300;
    color: #ffffff;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Project arrow styles removed */

.project-meta {
    text-align: right;
    position: relative;
    z-index: 2;
}

.project-meta span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(16, 16, 16, 0.8);
}

/* Gallery View */
.gallery-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #101010;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .gallery-view {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        transition: none;
    }
    
    /* Hide ESC hint on mobile */
    .gallery-esc-hint {
        display: none;
    }
    
    /* Add mobile close button */
    .gallery-close-btn {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.7);
        border: none;
        cursor: pointer;
        z-index: 1002;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: bold;
        color: #fff;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .gallery-close-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.8);
    }
}

.gallery-esc-hint {
    position: fixed;
    bottom: 24px;
    right: 24px;
    color: #fff;
    font-size: 14px;
    z-index: 1001;
    pointer-events: none;
}

.gallery-view.active {
    opacity: 1;
    visibility: visible;
}

/* Gallery header and close button styles removed */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25vw, 1fr));
    gap: 2px;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    filter: grayscale(0%);
}

/* Mobile-friendly touch feedback */
@media (max-width: 768px) {
    .gallery-item {
        transition: none;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        transform: none !important;
    }
    
    .gallery-item::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        opacity: 0;
        transition: none;
        pointer-events: none;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
        background-size: 20px 20px;
        background-repeat: no-repeat;
        background-position: center;
    }
    
    .gallery-item:active {
        box-shadow: none;
    }
    
    .gallery-item:active::after {
        opacity: 1;
    }
    
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-item img {
        transition: none;
    }
}

/* Featured project animations */
.featured-project {
    transition: all 0.3s ease;
}

.featured-project.hidden {
    opacity: 0;
    transform: translateY(-20px);
}

/* Project Details Overlay */
.project-details-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 16, 16, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.project-details-content {
    background: #fff;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    animation: scaleIn 0.3s ease-out;
}

.close-details {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    transition: color 0.3s ease;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-details:hover {
    color: #666;
}

.project-details-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.project-details-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Website projects show full image */
.website-project .project-details-image img {
    object-fit: contain;
}

/* App projects fill the container */
.app-project .project-details-image img {
    object-fit: cover;
}

.project-details-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-details-info h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
}

.project-details-info .project-meta {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    font-weight: 400;
}

.project-details-info .project-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    font-weight: 300;
    margin-bottom: 30px;
}

.project-tools {
    margin-top: 20px;
}

.project-tools h3 {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin-bottom: 15px;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-tag {
    background: #f5f5f5;
    color: #666;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.tool-tag:hover {
    background: #e8e8e8;
    color: #333;
}

/* Project Actions */
.project-actions {
    margin-top: 30px;
}

.figma-btn {
    background: #1E1E1E;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.figma-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .project-details-content {
        grid-template-columns: 1fr;
        max-width: 95%;
        max-height: 90vh;
    }
    
    .project-details-image {
        min-height: 250px;
    }
    
    .project-details-info {
        padding: 30px 20px;
    }
    
    .project-details-info h2 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .project-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 30px;
    }
    
    .project-details-info .project-meta {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .close-details {
        color: #fff;
    }
    
    .close-details:hover {
        color: #ddd;
    }
}

/* Footer */
footer {
    padding: 20px 24px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    flex: 0 0 auto;
    max-width: 30%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 300;
}

.footer-center {
    flex: 1;
    text-align: center;
    max-width: 40%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 300;
}

.footer-right {
    flex: 0 0 auto;
    max-width: 30%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 300;
}

.footer-left a,
.footer-right a {
    color: #333;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-left a:hover,
.footer-right a:hover {
    opacity: 0.6;
}

.footer-left span {
    color: #999;
    margin: 0 4px;
}

.footer-center span {
    color: #999;
}

/* Responsive Design */
/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
    main {
        padding: 0 30px;
    }
    
    .main-content {
        gap: 30px;
    }
    
    .project-container {
        min-width: 600px;
    }
    
    .project-content {
        max-height: calc(55vh - 60px);
    }
    
    .project-title h1 {
        font-size: 3rem;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Enable scrolling on mobile */
    body {
        height: auto;
        overflow: auto;
        overflow-x: hidden;
    }
    
    /* Navigation adjustments */
    header {
        position: fixed;
        background-color: rgba(255, 255, 255, 0.98);
    }
    
    nav {
        padding: 15px 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-left {
        max-width: 40%;
    }
    
    .nav-left h1 {
        font-size: 16px;
    }
    
    .nav-center {
        display: none;
    }
    
    .nav-right {
        max-width: 40%;
        text-align: right;
    }
    
    .language-toggle {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 35px;
    }
    
    /* Main content mobile layout */
      main {
          padding: 0;
          margin-top: 70px;
          height: auto;
          min-height: calc(100vh - 140px);
          overflow: visible;
      }
     
     .main-content {
         display: flex;
         flex-direction: column;
         gap: 40px;
         height: auto;
         padding: 30px 0;
         align-items: flex-start;
         width: 100%;
     }
    
    /* Featured project mobile - First (Full Width) */
      .featured-project {
          order: 1;
          height: auto;
          padding: 0;
          width: 100vw;
          margin-left: calc(-50vw + 50%);
      }
      
      .project-container {
          min-width: auto;
          width: 100%;
      }
      
      .project-frame {
          padding: 20px;
          margin: 0;
      }
      
      .project-content {
          aspect-ratio: 4/3;
          max-height: 300px;
          padding: 20px;
          filter: grayscale(0%);
      }
      
      .project-title h1 {
          font-size: 2.2rem;
          line-height: 0.95;
      }
      
      .project-meta span {
          font-size: 13px;
      }
      
      /* About section mobile - Second */
      .about-section {
          order: 2;
          height: auto;
          padding: 0 20px;
      }
      
      .about-content h3 {
          font-size: 20px;
          margin-bottom: 16px;
      }
      
      .about-content p {
          font-size: 15px;
          line-height: 1.7;
          margin-bottom: 14px;
      }
      
      /* Certificates section mobile - Third */
      .certificates-section {
          order: 3;
          height: auto;
          padding: 0;
      }
    
    .certificates-content {
        padding-left: 20px;
    }
    
    .certificates-content h3 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .certificate-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .cert-name {
        font-size: 15px;
    }
    
    .cert-year {
        font-size: 13px;
    }
    
    /* Footer mobile */
    footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 20px;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        max-width: 100%;
    }
    
    /* Gallery mobile adjustments */
    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
        height: auto;
        min-height: 100vh;
        width: 100%;
        box-sizing: border-box;
    }
    
    .gallery-item {
        overflow: hidden;
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        aspect-ratio: 4/3;
        display: block;
    }
    
    .gallery-esc-hint {
        bottom: 20px;
        right: 20px;
        font-size: 12px;
    }
    
    /* Modal mobile adjustments */
    .modal-content {
        padding: 30px 20px;
        max-width: 90%;
        width: 90%;
    }
    
    .email-container {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    
    .email-text {
        font-size: 14px;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    /* Enable scrolling on small mobile devices */
    body {
        height: auto;
        overflow: auto;
        overflow-x: hidden;
    }
    
    /* Extra small screens adjustments */
    nav {
        padding: 12px 16px;
    }
    
    .nav-left h1 {
        font-size: 15px;
    }
    
    .contact-btn {
        font-size: 13px;
    }
    
    /* Main content for small screens */
     main {
         padding: 0;
         margin-top: 60px;
     }
     
     .main-content {
         gap: 30px;
         padding: 20px 0;
     }
     
     /* About and certificates sections padding for small screens */
     .about-section {
         padding: 0 16px;
     }
     
     .certificates-section {
         padding: 0;
     }
    
    /* About section small screens */
    .about-content h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .about-content p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    /* Featured project small screens */
    .project-frame {
        padding: 15px;
    }
    
    .project-content {
        aspect-ratio: 4/3;
        max-height: 250px;
        padding: 15px;
    }
    
    .project-title h1 {
        font-size: 1.8rem;
        line-height: 0.9;
    }
    
    .project-meta span {
        font-size: 12px;
    }
    
    /* Certificates small screens */
    .certificates-content h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .certificate-item {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    
    .cert-name {
        font-size: 14px;
    }
    
    .cert-year {
        font-size: 12px;
    }
    
    /* Footer small screens */
    footer {
        padding: 16px;
        gap: 6px;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        font-size: 11px;
    }
    
    /* Modal small screens */
    .modal-content {
        padding: 25px 15px;
        max-width: 95%;
        width: 95%;
    }
    
    .modal-content h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .email-container {
        flex-direction: column;
        gap: 10px;
        padding: 15px 10px;
    }
    
    .email-text {
        font-size: 13px;
        word-break: break-all;
    }
    
    .copy-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* Gallery small screens */
    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 18px;
        height: auto;
        min-height: 100vh;
        width: 100%;
        box-sizing: border-box;
    }
    
    .gallery-item {
        border-radius: 8px;
        overflow: hidden;
        width: 100%;
        max-width: 85vw;
        margin: 0 auto;
        aspect-ratio: 4/3;
        display: block;
    }
    
    .gallery-esc-hint {
        bottom: 16px;
        right: 16px;
        font-size: 11px;
    }
    
    /* Loader adjustments for mobile */
    .loader-text {
        font-size: 36px;
    }
    
    @keyframes moveToNav {
        0% {
            transform: translate(0, 0) scale(1);
        }
        100% {
            transform: translate(calc(-50vw + 80px), calc(-50vh + 30px)) scale(0.42);
        }
    }
}