/*
Colour Pallet:
    #1D1D1B - Carbon Black
    #FFFFF7 - Porcelin
    #E7E7DD - Soft Linen
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #FFFFF7;
    font-family: 'IBM Plex Mono', monospace; 
}

/*----------------------------------------------------------------------------------/

/* loading screen START */
.loading-screen{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1D1D1B;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-screen.hidden{
    transform: translateY(-120%);
    transition: transform 0.8s ease-out;
}

.loading-svg{
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

/* Hide loading screen if already shown this session */
.skip-loading .loading-screen {
    display: none !important;
}
/* loading screen END */

/*----------------------------------------------------------------------------------/

/* Header START */
.site-header {
    font-family: 'IBM Plex Mono', monospace;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 1rem 2rem;
    background-color: transparent; /* so that the waves show behind*/
    transition: backdrop-filter 0.5s ease-out, background-color 0.5s ease-out;
}

.site-header.has-glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* safari support */
    background-color: rgba(255, 255, 247, 0.7); /* Semi-transparent Eggshell */
    border-bottom: 1px solid rgba(29, 29, 27, 0.1); /* subtle border */
} 


.logo a {
    color: #1D1D1B;
    text-decoration: none;
    font-size: 3rem;
    font-weight: 500;
}

.main-nav ul{
    display: flex;
    list-style: none;
    gap: 3rem;
    padding: 0;
    margin: 0;
}

.main-nav a {
    color: #1D1D1B;
    text-decoration: none;
    position: relative;
    display: inline-block;
    font-size: 1rem;
    font-weight: 300;
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: -4px; /* position below text */
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1D1D1B;
    transition: width 0.3s ease-out;
}

.main-nav a:hover::before {
    width: 100%;
}
/* Header END */

/*----------------------------------------------------------------------------------/

/* Body START*/
/* landing START*/
#landing {
    height: 100vh; /* shoudl allow for scrolling and seeing next section */
    min-height: 100vh;
    max-height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    z-index: 10;
    overflow: hidden;  /* Prevent second scrollbar */
}

#landing .section-content {
    position: relative;
}

.welcome-text {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(2rem, 5vw + 1rem, 5rem);
    font-weight: 300;
    color: #1D1D1B;
    line-height: 1;
}

.welcome-text h1 {
    letter-spacing: 0.03em;
    margin: 0;
    font-weight: 500;
}

.scroll-prompt {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 50;
    font-family: 'IBM Plex Mono', monospace;
}

.scroll-text {
    font-size: 0.75rem;
    color: #1D1D1B;
    text-transform: lowercase;
    letter-spacing: 0.1em;
}

.scroll-arrow {
    font-size: 1.2rem;
    color: #1D1D1B;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
/* landing END*/

/*About START*/
#about {
    height: 100vh;
    position: relative;
    font-family: 'IBM Plex Mono', monospace;
    scroll-snap-align: none;
    z-index: 10;
    overflow: hidden;
}

#about .section-content {
    background-color: #1D1D1B; 
    padding: clamp(6rem, 10vw, 10rem) clamp(2rem, 4vw, 4rem) clamp(2rem, 3vw, 3rem); 
    color: #1D1D1B; /* Carbon Black */
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

#about h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(2rem, 5vw, 4rem); 
    font-weight: 500;
    color: #3a3a3a;
    margin-bottom: clamp(1rem, 2vw, 2rem);  /* More space below title */
    margin-top: 3rem;
}

#about .about-text-wrapper {
    width: 100%;
    max-width: 80%;  
    margin-left: 15%; 
    position: relative;
    padding-bottom: 2rem;
}

#about .about-line {
    width: 0;
    height: 3px;
    background-color: #FFFFF7; /* Porcelin */
    margin-top: 1.5rem;
    position: absolute; 
    bottom: 0;
    left: 0;
}

#about .fade-in-sentence {
    opacity: 0;
    font-size: clamp(1rem, 1.3vw, 1.3rem);  /* Reduced from 2.2vw to 1.3vw */
    line-height: clamp(1.6, 1.8vw, 1.8);    /* Reduced from 2.2vw */
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);  /* Reduced from 2vw */
    color: #3a3a3a; 
    text-align: left;
}

#about .fade-in-sentence.visible {
    opacity: 1;
    color: #1D1D1B; /* Charcoal Brown */
}

#about .fade-in-sentence.active {
    color: white;
}
/*About END*/

/*Projects START*/
#projects {
    height: 100vh;
    min-height: 100vh;
    position: relative;
    font-family: 'IBM Plex Mono', monospace;
    z-index: 10;
    background: #1D1D1B;
    overflow: hidden;
    box-sizing: border-box;
}

#projects .section-container {
    height: 100vh;
    box-sizing: border-box;
}

#projects .section-content {
    background: transparent;
    padding: 80 0 0 0;
    color: #1D1D1B;
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Large "Portfolio" overlay text */
.projects-overlay-title {
    position: absolute;
    top: 27%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(4rem, 10vw, 10rem);
    font-weight: 400;
    color: #3a3a3aaf;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

/* Horizontal scroll container */
.projects-scroll-container {
    display: flex;
    gap: clamp(1rem, 2vw, 2rem);  /* Responsive gap */
    padding: clamp(1rem, 2vw, 2rem);  /* Responsive padding */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    z-index: 2;
    position: relative;
    width: 100%;
    height: auto;               /* wrap tiles height instead of filling viewport */
    align-items: center;        /* Always centered vertically within their own row */
    
    /* Smooth scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.projects-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Individual project tile */
.project-tile {
    position: relative;
    min-width: clamp(320px, 32vw, 480px);  /* Scales with viewport */
    height: clamp(320px, 32vw, 480px);     /* Matches width - stays square */
    aspect-ratio: 1 / 1;  /* Ensures square at all sizes */
    border-radius: 0;
    overflow: hidden;
    scroll-snap-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 247, 0.1);
}

.project-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.4s ease;
}

/* Hover effects */
.project-tile:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 247, 0.3);  /* Border brightens on hover */

}

.project-tile:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

/* Overlay with title */
.project-tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(29, 29, 27, 0.9) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-tile:hover .project-tile-overlay {
    opacity: 1;
}

.project-tile-overlay h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    font-weight: 300;
    color: #FFFFF7;
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

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

.projects-scroll-prompt {
    position: absolute;
    bottom: 3rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 50;
    font-family: 'IBM Plex Mono', monospace;
    pointer-events: none;
}

.projects-scroll-prompt .scroll-text {
    font-size: 0.75rem;
    color: #FFFFF7;
    text-transform: lowercase;
    letter-spacing: 0.1em;
}

.scroll-arrow-horizontal {
    font-size: 1.2rem;
    color: #FFFFF7;
    animation: slideHorizontal 2s infinite;
}

@keyframes slideHorizontal {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(10px);
    }
    60% {
        transform: translateX(5px);
    }
}

.projects-nav {
    position: relative;
    margin-top: 1.5rem;               /* sits just under tiles */
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    z-index: 20;
}

.projects-nav-btn {
    background: none;
    border: none;
    color: #3a3a3aaf;               
    padding: 0;
    font-size: 2rem;             
    cursor: pointer;
    line-height: 1;
    transition: transform 0.1s ease, color 0.2s ease;
}

.projects-nav-btn:hover {
    color: #FFFFF7;
    transform: translateY(-1px);
}
/*Projects END*/

/*Contact START*/
#contact {
    height: 100vh;
    position: relative;
    font-family: 'IBM Plex Mono', monospace;
    padding-top: 30px;
    box-sizing: border-box;
}

#contact .section-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 3rem 2rem;
    background-color: transparent; /* waves show through */
    position: relative;
    z-index: 10; /* In front of waves */
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.contact-form-container {
    background-color: rgba(231, 231, 221, 0.60); 
    border: 1px solid #1D1D1B;
    padding: clamp(2rem, 3vw, 3rem) clamp(2.5rem, 4vw, 4rem);  /* Increased padding */
    max-width: 1200px;
    width: 90%;
    font-family: 'IBM Plex Mono', monospace;
    position: relative;
    z-index: 10;
}

.contact-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #1D1D1B;
    margin-bottom: 2rem;
    line-height: 1;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-detail {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    color: #1D1D1B;
    margin: 0;
}

/* Remove auto-detected phone link styling on iOS */
.contact-detail a,
.contact-detail a[href^="tel"] {
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: #1D1D1B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid #1D1D1B;
    padding: 0.75rem 0;
    color: #1D1D1B;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    outline: none;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: #1D1D1B;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
   color: rgba(146, 146, 146, 0.6); /* Porcelain with opacity */
}

.submit-btn {
    background: transparent;
    border: 1px solid #1D1D1B;
    color: #1D1D1B;
    padding: 0.75rem 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background-color: #1D1D1B;
    color: #FFFFF7;
}

.contact-links {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.contact-link {
    color: #1D1D1B;
    font-size: 2rem;
    text-decoration: none;
    transform: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.contact-link:hover {
    color:#1D1D1B;
    transform: translate(-3px);
}

.contact-link i {
    color: #1D1D1B;
}
/*Contact END*/

.section-content {
    height: auto;
    min-height: 100%;
    max-height: auto;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.section-container{
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Footer START*/
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem 0.5rem;
    background-color: transparent;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #1D1D1B;
    position: relative;
    z-index: 50;
    width: 100%;
    margin-top: 0;
}

.site-footer p {
    margin: 0;
    z-index: 10;
}

/* Footer END*/
/* Body END*/

/*----------------------------------------------------------------------------------/
/* stock-portfolio-app + personal-website.html */
.project-detail {
    padding-top: 6rem;
}

.project-hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.project-hero h1 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: #1D1D1B;
    margin-bottom: 1rem;
}

.project-hero .project-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #3a3a3a;
    max-width: 600px;
}

/* Project Content Section */
.project-content {
    background-color: #E7E7DD;
    padding: 4rem 2rem;
    position: relative;
    z-index: 10;
}

.project-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

/* Left Column - Overview */
.project-overview {
    position: sticky;
    top: 6rem;
    align-self: start;
}

.project-summary {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    line-height: 1.7;
    color: #1D1D1B;
    margin-bottom: 2rem;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 247, 0.7);
    border: 1px solid #1D1D1B;
    border-radius: 0.5rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(29, 29, 27, 0.1);
}

.meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3a3a3a;
}

.meta-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1D1D1B;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: #1D1D1B;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid #1D1D1B;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-link:hover {
    background-color: #1D1D1B;
    color: #FFFFF7;
}

/* Right Column - Details */
.project-details {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.detail-section h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1D1D1B;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1D1D1B;
}

.detail-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-section li {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1D1D1B;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.detail-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3a3a3a;
}

.detail-section li strong {
    color: #1D1D1B;
}

/* project gallery */
.project-gallery {
    padding: 3rem 2rem;
    background-color: #1D1D1B;
    position: relative;
    z-index: 10;
}

.project-gallery-container {
    max-width: 900px;
    margin: 0 auto;
}

.project-gallery h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: #FFFFF7;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 1.5rem;
    justify-content: center;
}

.gallery-grid img {
    height: 700px;
    width: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 247, 0.1);
}

.gallery-grid img:hover {
    transform: scale(1.006);
}

/* Hide scrollbar but keep functionality */
.gallery-grid::-webkit-scrollbar {
    height: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: #3a3a3a;
    border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: #FFFFF7;
    border-radius: 4px;
}

/* Full-width gallery variant for personal website page */
.project-gallery-fullwidth .project-gallery-container {
    max-width: 100%;  /* Override the 900px constraint */
    width: 100%;
}

.project-gallery-fullwidth .project-gallery-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
/*----------------------------------------------------------------------------------/

/* waves background START */
a-waves {
    display: block;
    --x: -0.5rem;
    --y: 50%;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
}

a-waves:before {
    position: absolute;
    top: 0;
    left: 0;

    width: 0.5rem;
    height: 0.5rem;

    background: #FFFFF7; /* Porcelain */
    border-radius: 50%;

    transform: translate3d(calc(var(--x) - 50%), calc(var(--y) - 50%), 0);

    will-change: transform;

    content: "";
}

a-waves svg {
    display: block;

    width: 100%;
    height: 100%;
}

a-waves svg path {
    fill: none;
    /*stroke: #1D1D1B; /* Carbon Black */
    stroke: #E7E7DD; /* Soft Linen */
    stroke-width: 1px;
}
/* waves background END */

/*----------------------------------------------------------------------------------/
/* Laptop START - screen sizes (769px - 1600px) */
@media (min-width: 769px) and (max-width: 1600px) {
    /* Fix landing section scrollbar */
    #landing {
        overflow: hidden;
    }
    
    /* About section - Smaller text for readability */
    #about .about-text-wrapper {
        width: 75%;
        max-width: 75%;
        margin-left: 12%;
    }
    
    #about h2 {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }
    
    #about .fade-in-sentence {
        font-size: clamp(0.8rem, 1.1vw, 1.05rem);  
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    #projects {
        min-height: 100vh !important;
        height: auto !important;
    }
    /* Projects tiles*/
    .project-tile {
        min-width: clamp(310px, 28vw, 420px) !important;  
        height: clamp(310px, 28vw, 420px) !important;
    }
    
    .projects-overlay-title {
        font-size: clamp(4.5rem, 9vw, 8rem) !important;  
        top: 23% !important;
    }
    
    /* Push scroll container down */
    .projects-scroll-container {
        padding-top: 8rem !important;  /* Push tiles down */
    }
  
    /* Contact section */
    #contact {
        height: 100vh !important;
        min-height: 100vh !important;
    }
    
    #contact .section-content {
        padding: 6rem 2rem 0rem !important;  /* Increased top padding to push content down */
        gap: 1rem !important;  
        align-items: center !important;  
        justify-content: flex-start !important;
    }
    
    .contact-form-container {
        width: 82% !important;
        padding: 1.5rem 1.75rem !important;  /* Further reduced */
        max-width: 1000px !important;  /* Limit max width */
    }
    
    .contact-title {
        font-size: clamp(1.8rem, 3vw, 2.5rem);
        margin-bottom: 0.75rem !important;  /* Less space below title */
    }
    
    .contact-wrapper {
        gap: 0.75rem !important;  /* Tighter gap between info and form */
    }
}

/* Laptop END*/


/* MOBILE FIXES - PHONE PORTRAIT VIEW ONLY */
@media (max-width: 768px) {
    /* Loading Screen - Make SVG bigger to cover screen */
    .loading-screen {
        height: 100dvh;
        width: 100vw;
        overflow: hidden;
    }

    .loading-svg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Landing Page */
    .welcome-text h1 {
        font-size: clamp(3rem, 15vw, 5rem) !important;
        line-height: 1.1 !important;
        word-spacing: 100vw; /* Forces line break between words */
    }
    
    /* Header */
    .site-header {
        padding: 1.5rem 1rem;
    }
    
    .logo a {
        font-size: 1.8rem !important;
    }
    
    .main-nav a {
        font-size: 1.1rem !important;
    }
    
    /* About Section */
    #about .section-content {
        padding: 2.5rem 1.5rem 3rem !important;  /* More bottom padding for line */
    }
    
    #about h2 {
        font-size: 2.5rem !important;  
        margin-bottom: 1.5rem !important;  
    }
    
    #about .fade-in-sentence {
        font-size: 0.90rem !important; 
        line-height: 1.5 !important;  
        margin-bottom: 0.8rem !important;  
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    #about .about-text-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding: 0 0.5rem !important;
        margin-bottom: 2rem !important;  
    }
    
    /* Projects Section*/
    .projects-overlay-title {
        font-size: clamp(4.5rem, 18vw, 8rem) !important;
        top: 25% !important;  
        transform: translate(-50%, -50%) !important;
    }
    
    .project-tile {
        min-width: clamp(300px, 85vw, 400px) !important;
        height: clamp(300px, 85vw, 400px) !important;
    }
    
    .projects-scroll-container {
        padding: 1.5rem !important;
        gap: 1.5rem !important;
    }
    
    .projects-scroll-prompt {
        bottom: 5rem !important;
    }

    .projects-nav {
        margin-top: 1rem;
        gap: 1rem;
    }

    /* Contact Section - Better spacing and sizing */
    #contact {
        height: auto !important;
        min-height: 100vh !important;
    }
    
    #contact .section-content {
        padding: 4rem 1rem 2rem !important;  /* Reduced horizontal padding */
        gap: 1.5rem !important;
    }
    
    .contact-form-container {
        padding: 1.5rem 1rem !important;  /* Reduced padding */
        width: 92% !important;  /* Reduced from 95% to fit better */
        max-width: 100% !important;
    }
    
    .contact-title {
        font-size: 1.8rem !important;  /* Reduced from 2.2rem */
        margin-bottom: 1rem !important;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .contact-detail {
        font-size: 1rem !important;
    }
    
    .contact-form input,
    .contact-form textarea {
        font-size: 0.95rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .contact-links {
        gap: 2.5rem !important;
        padding: 1rem 0 !important;
    }
    
    .contact-link i {
        font-size: 2.2rem !important;
    }
    
    /* Footer */
    .site-footer {
        font-size: 0.75rem !important;
        padding: 1rem 1.5rem 0.5rem !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        text-align: center !important;
    }

    /* PROJECT DETAIL PAGES - Mobile Layout */
    .project-hero {
        height: auto !important;
        min-height: 40vh !important;
        padding: 3rem 1rem !important;
    }

    .project-hero h1 {
        font-size: 2rem !important;
    }

    .project-hero .project-subtitle {
        font-size: 0.95rem !important;
    }

    .project-content {
        padding: 2rem 1rem !important;
    }

    .project-detail-container {
        grid-template-columns: 1fr !important;  /* Single column on mobile */
        gap: 2rem !important;
    }

    .project-overview {
        position: relative !important;  /* Remove sticky on mobile */
        top: 0 !important;
    }

    .project-meta {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }

    .project-meta-item strong {
        font-size: 0.85rem !important;
    }

    .project-details {
        gap: 2rem !important;
    }

    .detail-section h3 {
        font-size: 1.1rem !important;
    }

    .detail-section p,
    .detail-section li {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    /* Project Gallery - Stack images */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .project-gallery img {
        width: 100% !important;
        height: auto !important;
    }

    /* PROJECT TILES - Always show title on mobile (no hover) */
    .project-tile-overlay {
        opacity: 1 !important;  /* Always visible on mobile */
        background: linear-gradient(to top, rgba(29, 29, 27, 0.85) 0%, transparent 50%) !important;
    }

    .project-tile-overlay h3 {
        transform: translateY(0) !important;  /* Always in position */
        font-size: 1.2rem !important;
    }
}

 /* Extra small screens */
@media (max-width: 480px) {
    .site-header {
        padding: 0.75rem;
    }
    
    .logo a {
        font-size: 1rem;
    }
    
    .main-nav ul {
        gap: 1rem;
    }
    
    .main-nav a {
        font-size: 0.8rem;
    }
    
    .welcome-text {
        bottom: 1rem;
        left: 1rem;
        font-size: clamp(1.2rem, 7vw + 0.3rem, 2.5rem);
    }
    
    #about .section-content {
        padding: 1.5rem 1rem;
    }
    
    #about h2 {
        font-size: 1.5rem;
    }
    
    #about p {
        font-size: 0.9rem;
    } 
}
/* Mobile END*/

/*----------------------------------------------------------------------------------/