@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Poppins:wght@400;500;600&display=swap');

/* --- Global Variables --- */
:root {
    --bg-color: #FCFAF1;
    --text-color: #000000;
    --primary-accent: #974359;
    --card-bg: #F1F0E5;
}

/* --- Base & Typography --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none; 
}

h1, h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-top: 15px;
}

p {
    font-size: 14px;
    line-height: 1.6;
}

main {
    flex: 1;
    padding: clamp(20px, 4vw, 40px) 7.5%; 
}

/* --- Global Animations --- */
@keyframes sequenceFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Header & Nav --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 3.5%; 
}

.logo {
    font-family: 'DM Serif Display', serif;
    font-style: italic;
    font-size: 50px; 
    text-decoration: none;
    color: var(--text-color);
    white-space: nowrap;
}

nav a {
    font-family: 'Poppins', sans-serif;
    font-size: 24px; 
    font-weight: 400; 
    text-decoration: none;
    color: var(--text-color);
    margin-left: 30px;
    transition: color 0.2s ease, text-decoration 0.2s ease; 
}

nav a.active {
    font-weight: 600;
    color: var(--text-color);
}

nav a:hover {
    color: var(--primary-accent);
    text-decoration: underline;
}

.menu-toggle {
    display: none; 
    cursor: pointer;
    user-select: none;
    margin-top: 5px; 
}

.menu-toggle img {
    width: 40px; 
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

.menu-toggle:active img {
    transform: scale(0.9);
}

/* --- Home Page --- */
.home-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(20px, 3vw, 40px) 2% 0 2%; 
    width: 100%;
    box-sizing: border-box;
}

.home-header .logo {
    font-size: max(60px, 13vw); 
    line-height: 0.9; 
    text-align: center;
    width: 100%;
    white-space: nowrap;
    opacity: 0;
    animation: sequenceFade 0.7s ease-out forwards;
    animation-delay: 0.2s;
}

.home-header .home-nav {
    display: flex;
    justify-content: space-between; 
    width: 100%;
    padding: 0 6.5%; 
    box-sizing: border-box;
    margin-top: 10px;
    opacity: 0;
    animation: sequenceFade 0.7s ease-out forwards;
    animation-delay: 1s;
}

.home-header .home-nav a {
    margin: 0;
    font-size: max(16px, 1.75vw);
}

.home-nav a[href="index.html"] {
    display: none;
}

.home-layout {
    display: flex;
    align-items: stretch; 
    justify-content: center; 
    gap: clamp(40px, 6vw, 80px); 
    opacity: 0;
    animation: sequenceFade 0.7s ease-out forwards;
    animation-delay: 1.8s;
}

.bio {
    max-width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bio h1 {
    font-size: max(36px, 3.5vw);
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 20px;
}

.bio p {
    font-size: max(15px, 1.33vw); 
    line-height: 1.8; 
    font-weight: 400; 
    margin: 0;
}

.profile-image {
    display: flex;
}

.profile-image img {
    width: 100%;
    max-width: max(300px, 35vw);
    height: 100%; 
    object-fit: cover; 
    border-radius: 35px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* --- Projects Page --- */
main.projects-split-layout {
    padding: 0; 
    display: flex;
    flex: 1; 
    width: 100%;
}

.projects-left {
    flex: 0 0 50%; 
    background-color: var(--primary-accent); 
    position: relative; 
    overflow: hidden; 
}

.preview-img {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    opacity: 0; 
    transition: opacity 0.4s ease-in-out; 
    z-index: 1; 
}

.preview-img.visible {
    opacity: 1; 
    z-index: 2; 
}

.projects-right {
    flex: 0 0 50%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    padding: 80px 4% 0 6%; 
    box-sizing: border-box; 
    gap: 60px; 
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    width: 100%; 
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease; 
}

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

.project-num {
    font-family: 'Poppins', sans-serif;
    font-size: 3.25vw; 
    font-weight: 600;
    color: var(--primary-accent);
    width: 90px; 
}

.project-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.25vw; 
    font-weight: 400;
    text-align: right; 
    transition: color 0.2s ease;
}

.project-link:hover .project-title {
    color: var(--primary-accent);
    text-decoration: underline; 
}

/* --- Portfolio & Featured Work Pages --- */
.slideshow-section {
    position: relative;
    width: 100%;
    height: 60vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #000000;
}

.slideshow-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slideshow-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeSlide 12s infinite; 
}

.slideshow-bg img:nth-child(1) { animation-delay: 0s; }
.slideshow-bg img:nth-child(2) { animation-delay: 4s; }
.slideshow-bg img:nth-child(3) { animation-delay: 8s; }
.slideshow-bg img:nth-child(4) { animation-delay: 12s; }
.slideshow-bg img:nth-child(5) { animation-delay: 16s; }
.slideshow-bg img:nth-child(6) { animation-delay: 20s; }
.slideshow-bg img:nth-child(7) { animation-delay: 24s; }
.slideshow-bg img:nth-child(8) { animation-delay: 28s; }

@keyframes fadeSlide {
    0% { opacity: 0; }
    15% { opacity: 1; }
    33% { opacity: 1; }
    48% { opacity: 0; }
    100% { opacity: 0; }
}

.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.slideshow-title {
    font-family: 'DM Serif Display', serif;
    font-size: 90px;
    color: #ffffff;
    text-shadow: 2px 4px 15px rgba(0, 0, 0, 0.6); 
    position: relative;
    z-index: 2; 
    margin: 0;
    text-align: center;
}

.featured-section {
    background-color: var(--card-bg); 
    padding: 30px 5% 60px 5%; 
    width: 100%;
    box-sizing: border-box;
}

.featured-header {
    font-family: 'DM Serif Display', serif;
    font-size: 70px; 
    color: var(--text-color);
    margin: 0 0 30px 0;
    font-weight: normal;
}

.featured-content {
    display: flex;
    gap: 5%; 
    align-items: flex-start;
}

.featured-video-col {
    flex: 0 0 60%; 
    display: flex;
    flex-direction: column;
    gap: 30px; 
}

.featured-video-col h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px; 
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.featured-text-col {
    flex: 1; 
    padding-top: 10px; 
}

.featured-text-col p {
    font-family: 'Poppins', sans-serif;
    font-size: 24px; 
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    margin-top: 40px;
    gap: 40px;
}

.page-title {
    grid-column: 1 / -1;
    font-size: 70px;
    text-align: center;
    margin-bottom: 50px;
}

.video-item iframe,
.featured-video-col iframe,
.external-project-img {
    width: 100%; 
    height: auto;
    aspect-ratio: 16 / 9; 
    object-fit: cover; 
    border-radius: 35px; 
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    display: block; 
}

.video-item iframe:hover,
.featured-video-col iframe:hover,
.external-project-img:hover {
    transform: scale(1.03); 
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); 
}

.video-item a {
    display: block;
    width: 100%;
}

/* --- Contact Page --- */
.contact-split {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding: 3% 10% 2% 10%; 
    gap: 8%;
    min-height: calc(100vh - 240px); 
    box-sizing: border-box;
}

.contact-left {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
}

.contact-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.contact-form {
    width: 100%;
    max-width: 600px; 
    display: flex;
    flex-direction: column;
    gap: 25px; 
    margin-top: 25px; 
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 25px; 
    background-color: var(--card-bg); 
    border: 1px solid #d3d1c8; 
    border-radius: 30px; 
    font-family: 'Poppins', sans-serif;
    font-size: 20px; 
    color: var(--text-color);
    box-sizing: border-box;
}

.contact-form textarea {
    resize: none; 
    min-height: 320px; 
    border-radius: 30px; 
}

.submit-btn {
    background-color: var(--primary-accent, #8c283c);
    color: #ffffff;
    padding: 25px; 
    border: none;
    border-radius: 30px; 
    font-family: 'Poppins', sans-serif;
    font-size: 22px; 
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #6a1d2d;
}

.contact-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(75px, 7vw, 120px);
    color: var(--text-color);
    margin: 0 0 10px 0;
    line-height: 1;
}

.contact-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(20px, 1.75vw, 30px);
    color: var(--text-color);
    margin: 0 0 clamp(25px, 4vw, 50px) 0; 
}

.contact-socials-wrapper {
    display: flex;
    align-items: center;
    gap: clamp(15px, 2.5vw, 25px); 
}

.heart-icon {
    width: clamp(30px, 4vw, 45px); 
    height: auto;
}

.contact-socials {
    display: flex;
    gap: clamp(15px, 2vw, 20px); 
}

.contact-socials a img {
    width: clamp(35px, 4.5vw, 55px); 
    height: clamp(35px, 4.5vw, 55px);
    transition: transform 0.2s ease;
}

.contact-socials a img:hover {
    transform: scale(1.1);
}

/* --- Footer --- */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%; 
    background-color: var(--card-bg);
    margin-top: auto;
}

footer p {
    font-size: 16px; 
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.socials a {
    display: inline-block;
    margin-right: 20px;
    margin-top: 5px;
}

.socials img {
    width: 45px; 
    height: 45px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.socials img:hover {
    transform: scale(1.1);
    transform: rotate(20deg);
}

/* =========================================================
   RESPONSIVE DESIGN: SMALL DESKTOP & TABLET (Under 1150px)
========================================================= */

@media (max-width: 1150px) {
    
    .home-layout {
        flex-direction: column-reverse; 
        align-items: center; 
        gap: 35px; 
        margin-top: -5px;
    }

    .bio {
        max-width: 90%; 
    }

    .profile-image {
        justify-content: center;
        width: 100%;
    }

    .profile-image img {
        max-width: 85%; 
        height: 450px; 
        object-fit: cover; 
        object-position: top center;
    }
}

/* =========================================================
   RESPONSIVE DESIGN: MOBILE & TABLET (Under 800px)
========================================================= */

@media (max-width: 800px) {
    
    /* --- Base & Header Mobile --- */
    main {
        padding: 40px 5%;
    }

    header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 25px 5%;
        position: relative; 
    }

    .logo, .menu-toggle {
        position: relative;
        z-index: 100; 
    }

    .menu-toggle {
        display: block; 
    }

    #nav-menu {
        animation: none !important;
        display: flex !important; 
        opacity: 0; 
        visibility: hidden; 
        pointer-events: none; 
        transition: opacity 0.4s ease, visibility 0.4s ease; 
        position: fixed !important; 
        top: 0 !important; 
        left: 0;
        width: 100vw;
        height: 100dvh; 
        min-height: 100vh; 
        background-color: var(--bg-color); 
        z-index: 99; 
        flex-direction: column;
        justify-content: flex-start; 
        padding-top: 140px; 
        align-items: flex-end; 
        padding-right: 10%; 
        box-sizing: border-box;
        margin: 0 !important; 
        gap: 20px; 
    }

    #nav-menu.active {
        opacity: 1; 
        visibility: visible; 
        pointer-events: auto; 
    }

    #nav-menu a {
        margin-left: 0;
        font-size: 10vw !important; 
        line-height: 1.1;
        text-align: right; 
    }

    /* --- Home Page Mobile --- */
    .home-header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 25px 5%;
    }

    .home-header .logo, header .logo {
        font-size: clamp(24px, 8vw, 42px); 
        line-height: normal; 
        text-align: left;
        width: auto;
    }

    #nav-menu.home-nav a[href="index.html"] {
        display: block !important; 
    }

    .home-layout {
        flex-direction: column-reverse; 
        gap: 30px; 
        text-align: left; 
        animation-delay: 1s;
    }

    .bio {
        width: 100%;
        max-width: 100%;
        padding: 0 8%; 
        box-sizing: border-box;
    }

    .bio h1 {
        font-size: 32px;
        line-height: 1.2;
        margin-top: 0;
        margin-bottom: 15px;
    }

    .bio p {
        font-size: 14px;
        line-height: 1.6;
        text-align: left; 
        margin: 0; 
    }

    .profile-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .profile-image img {
        max-width: 85%;
        height: auto;
        margin-bottom: 5px;
    }

    /* --- Projects Page Mobile --- */
    main.projects-split-layout {
        flex-direction: column; 
    }

    .projects-left {
        width: 100%;
        height: 40vh; 
        min-height: 250px; 
    }

    .preview-img {
        object-position: top center; 
    }

    .projects-right {
        width: 100%;
        padding: 40px 5% 60px 5%; 
        gap: 40px; 
        justify-content: flex-start;
    }

    .project-num {
        font-size: 35px; 
        width: 50px; 
    }

    .project-title {
        font-size: 32px; 
        text-align: right; 
    }

    /* --- Portfolio & Featured Work Pages Mobile --- */
    .slideshow-section {
        height: 40vh; 
    }

    .slideshow-title {
        font-size: 60px;
    }

    .featured-content {
        flex-direction: column; 
        gap: 30px;
    }

    .featured-video-col {
        flex: none; 
        width: 100%; 
    }

    .featured-header {
        font-size: 50px;
        text-align: left; 
    }

    .featured-video-col h3 {
        font-size: 26px;
    }

    .featured-text-col {
        width: 100%;
        padding-top: 0; 
    }

    .featured-text-col p {
        font-size: 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
    }

    /* --- Contact Page Mobile --- */
    .contact-split {
        flex-direction: column-reverse; 
        padding: 40px 8%; 
        gap: 40px;
        min-height: auto;
    }

    .contact-right {
        align-items: flex-start; 
        text-align: left; 
        padding-top: 0;
        width: 100%;
    }

    .contact-title {
        font-size: 80px;
    }

    .contact-subtitle {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .contact-socials-wrapper {
        justify-content: flex-start;
    }

    .contact-left {
        width: 100%;
        justify-content: center;
    }

    .contact-form {
        margin-top: 0;
    }

    /* --- Footer Mobile --- */
    footer {
        flex-direction: column;
        gap: 10px; 
        padding: 20px 5%; 
        text-align: center;
    }

    footer p {
        font-size: 14px; 
    }

    .socials {
        display: flex;
        justify-content: center;
        gap: 15px; 
    }

    .socials a {
        margin-right: 0;
        margin-top: 0;
    }

    .socials img {
        width: 35px; 
        height: 35px;
    }
}